IonicWind Software

IWBasic => General Questions => Topic started by: Andy on January 16, 2012, 02:47:48 AM

Title: Detecting selected item on screen
Post by: Andy on January 16, 2012, 02:47:48 AM
Hi,

I was using the ENABLETABS command to allow tabbing of buttons on a screen but I would like to detect which button is in focus when the tab button is pressed

for example as screen may have three buttons:

"File" 
"Save"
"Quit"

How do I detect which button is highlighted when I have pressed the tab button?

Thanks,
Andy.
Title: Re: Detecting selected item on screen
Post by: Andy on January 28, 2012, 06:10:15 AM
SETFOCUS command stops the ENABLETABS command?

When I detect the tab key is pressed in the handler for a screen:

kp = @char

if kp = 9 'Tab key pressed
Setfocus f1,100
endif

This sets the focus on the item on screen but stops the tabbing function - why does it do that
and is there a way to get round it to enable tabbing again?