[Gambas-user] TextArea Control - Tab Key

Benoît Minisini gambas at ...1...
Tue Feb 11 16:14:43 CET 2014


Le 11/02/2014 16:04, Nigel Verity a écrit :
>
>
>
> Hi
>
> I have some text area controls which I would like to behave like text
> boxes, i.e hitting the tab key moves the cursor to the next control.
>
> I can write some long-hand code to monitor for chr(9) on the
> "keypress" event, but is there a tidier way of  achieving this - an
> obscure property perhaps?
>
> Thanks
>
> Nige

You should create your own MyTextArea control that inherits TextArea, 
and that uses an Observer to catch the tab key, move to the next 
control, and cancel its default behaviour.

Regards,

-- 
Benoît Minisini




More information about the User mailing list