This is a configuration option; by default it is set to allow Flash Player/AIR handle the tab key, but you can change this to allow TLF to handle the tab key instead.
Look at manageTabKey in the API docs: flashx.textLayout.elements.Configuration
I did this and it inserted the TLF tab into the markup but it still switched the focus to the next component in the tab list. Is this a defect?
Also, I tried to add it tab stops to the text flow and it just ignores them and tabs to the end of the line. Am I missing something?
Configuration(textFlow.configuration).manageTabKey = true;
textFlow.tabStops = [new TabStop(TabAlignment.START, 20)]
For the tab issue use TabStopFormat instead of TabStop. TabStopFormat provides type checking and input validation services that are consistent with the rest of the TLF styles.
I'm afraid this isn't working for me either. Build 460. I'm working with the AIR SDK in Flex 4 beta 1. Tab causes a new-line to appear (not a tab) in the TextFlow and then the focusManager kicks in, tabbing to the next Flex control.
The default behavior when there are no tab stops before the end of the line is to create a new line exactly as you describe. Please verify that you've specified tab stops.
This is even simpler than the above.
will create tabs at 100 and 200 pixels.
Thanks once again, I was confusing myself with the TabStopsFormat.defaultFormat, thinking that would supply some, it works perfectly when I use the formatted string you provide.
Is there a way to set a value to tabstop such that every new tab press adds a fixed value of space bet ween two characters