Skip navigation
Mahesh_Khatri
Currently Being Moderated

Tab in TLF

Jan 28, 2010 11:27 PM

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.

  • Currently Being Moderated
    Adobe Employee
    Jan 29, 2010 10:40 AM

    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

    |
    Mark as:
  • Currently Being Moderated
    Feb 17, 2011 8:08 AM

    Hello Richard,

     

    Is there a place where the defaultTabs are set?

    Can I change the defaultTabs?

     

    greetings, Stefan

    |
    Mark as:
  • Currently Being Moderated
    Adobe Employee
    Feb 17, 2011 11:18 AM

    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

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Feb 17, 2011 4:01 PM

    Thanks again, Richard!

     

    greetings, Stefan

    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points