[Gambas-user] Tabbing between DataControls inside DataSource?

Bill Richman bill at ...2351...
Mon Jan 25 00:43:26 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








More information about the User mailing list