graemeg / fpGUI

fpGUI Toolkit is a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net
Other
165 stars 55 forks source link

fpg_tab keyboard use #26

Closed JonnyTech closed 9 years ago

JonnyTech commented 9 years ago

How can I switch between tabs using the keyboard? Do I need to handle [SHIFT]+CTRL+TAB in my program or is it handled by fpGUI internally?

graemeg commented 9 years ago

Sorry for the delay in reply... I forget to check in Github (and SF.net) for support tickets - developers normally raise questions directly in the support newsgroup. No worries though. ;)

The PageControl has built-in keyboard shortcut support. Alt+[left] or Alt+[right] It is a bit flaky though.. eg: another edit widget inside a tabsheet can steal the focus. It is on my todo list to improve the shortcut support for PageControl, and default to more conventional shortcuts.

As you rightly said, you can also implement your own keyboard handler for the form, then set the active tab for the pagecontrol accordingly.

Hope this helps.

graemeg commented 9 years ago

Just to let you know the standardised Ctrl+TAB and Ctrl+Shift+TAB shortcuts have now been implemented in the fixes_1.4 and the develop branches. I've also removed the previous Alt+[left|right] shortcuts because they just didn't work well.

JonnyTech commented 9 years ago

Fantastic - thank you very much Graeme!