Hi Victor,

You can use accelerator char to "click" on the button
with your keyboard. In the button's caption place an
ampersand (&) before the character you want to be used
as accelerator char. Notice that the char will be
underlined.

After that, you can "click" on the button by pressing
Alt+X (where X is the picked char).

Of course you have to be sure that no duplicate
accelerator char.

If you want the button can be "clicked" using either
keyboard's Enter button or Escape button, then you can
use "Default" property (set to True) of the button for
click by Enter keyboard button. Use "Cancel" property
of the button for click by Esc keyboard button.


Cheers!

Luthfi B Hakim


--- Victor Fraenckel <[EMAIL PROTECTED]> wrote:

> I am new to the list. I have used  Delphi 7 since
> its arrival and before 
> that I used Delphi 4 and have been a Pascal
> programmer since before Turbo 3.
> 
> I have had a plaguing problem for a long time. It
> goes like this:
> 
> Say I have a form that contains several text boxes
> and several buttons. 
> The text boxes are at the beginning of the tab order
> and the form opens 
> with the first text box having the focus. The last
> button in the tab 
> order is a cancel button. With the focus in the
> first text box how can 
> the user just click on the cancel button and have
> the action attached to 
> the buttons OnClick event triggered? I would like to
> not have to tab 
> through the tab order to get to the cancel button.
> Is there a way to do 
> this?
> 
> Any enlightenment will be appreciated.
> 
> Vic


      
____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

Reply via email to