GUI Key Events

BlitzMax Forums/BlitzMax Programming/GUI Key Events

Tachyon(Posted 2006) [#1]
I've been looking through sample code until I am ready to pass out, and I cannot find any that shows how to capture a TAB Key Event to allow me to Tab between TextAreas in a Window. KeyEvents seem to work great if you have a Canvas Gadget, but without one I can't seem to figure out how to do it. Has anyone got a link to a sample (or documentation)? Thanks in advance!


CS_TBL(Posted 2006) [#2]
What about tucking away a small 1x1 pixel canvas in some corner, filled with the color of your form, and activate it so you can readout its key-events? :P


Tachyon(Posted 2006) [#3]
Yeah, I guess that'd do it. :) I just assumed there'd be a more "legitimate" way.


CS_TBL(Posted 2006) [#4]
In B+ keyboard-events just work anywhere, in BmaxGUI they need to come from canvases..


Tachyon(Posted 2006) [#5]
Nope...as soon as you type in the TextArea the Canvas is no longer active and stops sending KeyEvents.


skidracer(Posted 2006) [#6]
Check out the SetGadgetFilter example.


Tachyon(Posted 2006) [#7]
Nice. That'll do it! Thanks Skid.