Page 1 of 1

Keyboard interaction with OptionGadget

Posted: Sat Feb 21, 2015 10:41 pm
by blueznl
If a user doesn't have a mouse, how would he / she interact with multiple OptionGadget's?

Code: Select all

OpenWindow(1,10,10,200,200,"",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
OptionGadget(1,10,10,50,20,"Option 1")
OptionGadget(2,10,30,50,20,"Option 2")
OptionGadget(3,10,50,50,20,"Option 3")
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow

Re: Keyboard interaction with OptionGadget

Posted: Sat Feb 21, 2015 11:13 pm
by Little John
//edit:

I simplified and improved the code, and moved it to the "Tricks 'n' Tips" section.

Re: Keyboard interaction with OptionGadget

Posted: Sat Feb 21, 2015 11:41 pm
by blueznl
Ouch. No native support of the tab or left / right keys? That's bad...

Re: Keyboard interaction with OptionGadget

Posted: Sun Feb 22, 2015 10:36 am
by Little John
blueznl wrote:Ouch. No native support of the tab or left / right keys? That's bad...
Yes, unfortunately PB has no built-in support of up/down or left/right keys for changing the selected option within a group.

The TAB key shouldn't do that, but pressing TAB should leave the whole option group (remembering which option was selected), and activate another control.
I've extended my above code example, so that it demonstrates this behaviour.

Re: Keyboard interaction with OptionGadget

Posted: Fri Aug 11, 2017 8:15 pm
by Little John
[u]Announcement for PureBasic 5.45 LTS Beta 1[/u] wrote:optionGadget on Windows now support keyboard
Image

Re: Keyboard interaction with OptionGadget

Posted: Fri Aug 11, 2017 11:34 pm
by blueznl
Mmmm. On 5.60 x64 I can tab through the options, until one of them is selected (with the space bar), then it no longer works... Bug? Or is the LTS ahead of the non-LTS this time? :-)

Re: Keyboard interaction with OptionGadget

Posted: Sat Aug 12, 2017 6:52 am
by Little John
blueznl wrote:Or is the LTS ahead of the non-LTS this time? :-)
The newest final LTS version (which is PB 5.44) is not ahead of the newest final non-LTS version (which is PB 5.60).

However, I was talking about a change in the brand new version PB 5.45 LTS Beta 1, which is just a few days old.
In the post to which I've linked in my previous message, it reads:
[...] all the changes will be transfered on the 5.61 version.
In other words, the regarding new changes have not yet been implemented in version 5.60. :-)

BTW: It seems to be fixed now on Linux, too.