Jan 28, 2010 11:27 PM
Tab in TLF
-
Like (0)
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.
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
Hello Richard,
Is there a place where the defaultTabs are set?
Can I change the defaultTabs?
greetings, Stefan
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
Thanks again, Richard!
greetings, Stefan
North America
Europe, Middle East and Africa
Asia Pacific
Copyright © 2011 Adobe Systems Incorporated. All rights reserved.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-14-2009).