delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/19/05:22:11

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ALLEGRO: Problems with keyboard shortcut to edit box
Date: Wed, 18 Jun 1997 22:28:48 +0100
Organization: None
Distribution: world
Message-ID: <fQjEQPAQMFqzEw3N@talula.demon.co.uk>
References: <866633614 DOT 1311419 DOT 0 AT acecoin DOT demon DOT co DOT uk>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 26
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Nick Plant writes:
>The problem is, I can't get the shortcuts to the edit boxes working
>properly.

What do you think they ought to do? If you put the ASCII code of the
keyboard shortcut (case insensitive, use control codes for ctrl+key eg.
1=ctrl+a, 2=ctrl+b, etc) in the 'key' field of the dialog object,
pressing that key should move the input focus to the object. This will
only work if the currently focused object doesn't grab the keypress for
itself, though, so if you are already in an edit box, the shortcut needs
to be a control code rather than a regular keypress...

>Also, the tab key doesn't move from the last edit box to the first toggle
>button.

It doesn't: that's just the way I implemented it (tab is treated the
same as the right arrow key, so you have to use the left/up arrows to
move the other way). If you want to make tabs wrap in the more normal
manner, change the move_focus() routine in gui.c, and send me the diffs
so I can include them in the next version (I might do it myself someday,
but won't have time for a while).


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019