Skip navigation
hawkfanxity
Currently Being Moderated

Tab Key Usage

Feb 11, 2009 2:52 PM

Tab stops are included in TLF but while editing text if the tab key is pressed it executes the default Flex action of switching to the next component. I tried searching for a attribute so I could use the tab key in the way a normal text editor does but I couldn't find anything. Are we expected to have to capture the tab key input and insert the tab value ourselves?
 
Replies
  • Brian Thomas
    168 posts
    Nov 14, 2008
    Currently Being Moderated
    Feb 11, 2009 3:00 PM   in reply to hawkfanxity
    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
     
    |
    Mark as:
  • Currently Being Moderated
    Feb 23, 2009 1:14 PM   in reply to hawkfanxity
    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.
     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2009 9:06 AM   in reply to hawkfanxity

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2009 8:06 PM   in reply to richardleggettmk

    Hi,

     

    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.

    textFlow.tabStops="tabStops="s100 s200"

    will create tabs at 100 and 200 pixels.

     

    Regards,

    Richard

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 2, 2009 1:32 AM   in reply to rdermer

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 4:45 AM   in reply to rdermer

    Hi

     

    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

     

    Ashar

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points