Skip to main content
Patel Bharat
Inspiring
October 18, 2010
Question

Tab in TLF !!!

  • October 18, 2010
  • 1 reply
  • 628 views

Hi

I am trying to implement a sample of TLF with feature of Tab for paragraph like word document. If user click in paragraph and press 'Tab' then it should work like same as we experience in Word.

Can any one guide me ?

Bharat Patel

This topic has been closed for replies.

1 reply

Adobe Employee
October 18, 2010

By default TLF ignores the Tab key and it's used to navigate focus.  This can be changed by creating a custom Configuration and passing it into the TextConverter or the TextFlow constructor.  See the flashx.textLayout.elements.Configuration class.  Note that once a TextFlow is constructed its Configuration cannot be changed.

There is a defaultConfiguration that is used when no Configuration is specified.  So the simplest way to have all your TextFlows insert a tab on the tab key is to add this line to the startup before any TextFlows are created.

TextFlow.defaultConfiguration.manageTabKey = true;

Note that if you are using TLF wrapped by Flex or FlashCS5 then you'll have to work through the components and APIs they provide.

Hope that helps,

Richard