delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/20/14:26:49

Message-ID: <33AACBC2.168F@seanet.com>
Date: Fri, 20 Jun 1997 11:28:18 -0700
From: "Alan M. Doerhoefer" <aland AT seanet DOT com>
MIME-Version: 1.0
To: Nick Plant <Nick DOT Plant AT ace-coin DOT co DOT uk>
CC: djgpp AT delorie DOT com
Subject: Re: ALLEGRO: Problems with keyboard shortcut to edit box
References: <866802647 DOT 0513395 DOT 0 AT acecoin DOT demon DOT co DOT uk>

Nick wrote:
> Thanks for your solution. The disadvantage is that it depends on the
> screen position of the objects. It isn't always obvious which object is
> "next"
> when you press TAB (or an arrow key). Ideally, TAB would make move_focus
> offer the focus to the next object defined in the dialog.

I found that originally, before I made my change to the move_focus
routine, the tab key and the left and right arrow keys would indeed jump
to random objects in my dialog. But at least for me, in this instance,
using the up or down arrows always worked to move to the next edit box
defined in my dialog. I think it depends on the order you put them in
your dialog array definition. Also, you have to call the whole dialog by
passing it the position of the object (sequentially in the array) you
want to start focus on. Example: "do_dialog(the_dialog, 2)" This will
start the focus on the third object in your dialog. I hope this
helps--it may just be coincidence that it works the way I have it, but I
doubt it.


-- 
Alan Doerhoefer: aland AT seanet DOT com
http://www.seanet.com/~aland

- Raw text -


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