October 30, 2025, 01:02:12 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Detecting selected item on screen

Started by Andy, January 16, 2012, 02:47:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

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.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

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?
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.