Skip to main content
January 29, 2010
Question

Tab in TLF

  • January 29, 2010
  • 1 reply
  • 16960 views

I am working on a text editing tool and want to give user a Tab functionality but when user hits the tab the text shifts to next line. Is their any way to implement this.


-Mahesh.

This topic has been closed for replies.

1 reply

Adobe Employee
January 29, 2010

In this case I suspect you haven't set any tabstops.  FlashPlayer 10 treats a tab without tabstops as a newline.  FlashPlayer 10.1 (available as a prerelease download) has default tabStops set to every 48 pixels.

You can do one of two things to solve the problem:

1) set the tabStops property on the containing ParagraphElement (it inherits so you could also set it on the TextFlow)

2) Get the FlashPlayer 10.1 prerelease

You probably should do both.

Hope that helps,

Richard

Inspiring
February 17, 2011

Hello Richard,

Is there a place where the defaultTabs are set?

Can I change the defaultTabs?

greetings, Stefan

Adobe Employee
February 17, 2011

The defaults in FTE are fixed.  TextFlows are all created with a Configuration that defines the defaultTextFormat.

One choice is to create a custom Configuration and set the textFlowInitialFormat with the tabs you want.  Pass that Configuration into any TextFlow constructor or importer to get all TextFlows to use those tabs.

Another choice is to set TextFlow.defaultConfiguration to this new Configuration.

Hope that helps,

Richard