1 Reply Latest reply on Aug 24, 2007 2:27 AM by Laczeee

    Tabbing bettween TextField type objects

      Hi I am trying to make tabbing work between two TextField objects:
      I have created a custom UIComponent object, and have overridden the createChildren method, to create two additional TextField objects within. Everything works well, I can click on the text fields and they become active.

      The problem is, pressing TAB while I am on one of the text fields, does not take me to the other one, although I have specified the tabChildren for the custom UIComponent to be true. Also for the two TextFields the tabEnabled property is set to be true with tabIndexes 1 and 2.

      What else do I have to do to make the tabbing work? I will later have to use TextField (I am embeding flash components), so can this be done using TextField type objects?
        • 1. Tabbing bettween TextField type objects
          Laczeee Level 1
          Well, nobody responded for a long time, so I guess people did not know. I have found a solution:
          just set the stage.focus to the next TextField (or any other textField) in the handler of the KeyPress event (check the event when when tab is pressed). One thing must be done before accessing the stage variable however: the object (that refers to it) has to be added to the stage before it refers to it. Otherwise it returns null.

          Well, that's it. Enjoy! ;)