[Gambas-user] Tabbing between DataControls inside DataSource?

Benoît Minisini gambas at ...1...
Mon Jan 25 13:17:19 CET 2010


> I can't seem to figure out how to do this.  I downloaded the "tabbing"
> example project someone posted a while back (with text boxes you can tab
> between) and it works fine.  In my DataSource container, though, hitting
> tab in a DataControl just inserts a tab (or a bunch of spaces - not sure
> which).  I understand about the Hierarchy tab controlling the navigation
> order, but do I need to have a "keypress" event to trap the tab on each
> DC?  I've tried just adding one to the DS and having it call
> DataSource.Next, but that doesn't seem to work.  Things like this:
> 
> 
> PUBLIC SUB DataSource1_KeyPress()
> 
>   IF Key.text = Key.Tab THEN
> 
>     DEBUG "Key.Tab!"
> 
>     DataSource1.Next
> 
>   ENDIF
> 
>   IF Key.text = Key.BackTab THEN
> 
>     DEBUG "Key.BackTab!"
> 
>     DataSource1.Previous
> 
>   ENDIF
> 
> END
> 
> PUBLIC SUB dcCommonName_KeyPress()
> 
>   IF Key.text = Key.Tab THEN
> 
>     DEBUG "Key.Tab!"
> 
>     DataSource1.Next
> 
>   ENDIF
> 
>   IF Key.text = Key.BackTab THEN
> 
>     DEBUG "Key.BackTab!"
> 
>     DataSource1.Previous
> 
>   ENDIF
> 
> END
> 
> 
> What am I missing here?
> 
> 
> 
> 
> ---
> 
> Bill Richman - Lincoln, Nebraska
> 
> Tilter at windmills, maker of pies in the sky, & curmudgeon
> 
> email: bill at ...2350...  web: www.geektrap.com
> 

By default, TextArea controls (internally used by DataControl if the field has 
no length limit) eats the tab key. I tried to modify this behaviour in 
revision #2638, but I'm not sure I succeeded.

Regards,
 


-- 
Benoît Minisini




More information about the User mailing list