Skip navigation
RoadtripRyan2
Currently Being Moderated

TLF Highlighting and missing lines when scrolling.

Oct 22, 2010 9:03 AM

I have a TLF (tried it both in a canvas, and by using s:TextArea) that I want to display a document in with different words/areas highlighted.

 

I do the highlighting via a selection and edit manager:

 

var ss:SelectionState = new SelectionState(tf, myStart, myEnd);
editManager.applyLeafFormat(textLayoutFormat, ss);

 

This works great, and highlights as I want, however when I scroll the text area, any lines that have a highlight in them suddenly dissappear! If I scroll back to the start, they re-appear.

 

Any ideas? Am I going about applying highlghts the correct way? I am not doing anything on the textarea scroll event. Do I need to be?

 

Very odd behavior.

 

-Ryan

 
Replies
  • Currently Being Moderated
    Oct 25, 2010 8:55 PM   in reply to RoadtripRyan2

    Are you trying to have the same TextFlow appear in multiple places with different highlighting? If so, the best way to do that would be to copy the TextFlow so there is a unique version in each different Flex component that is using it. You can do that by calling deepCopy:

     

    var duplicateFlow:TextFlow = textFlow.deepCopy();

     

    I may have misunderstood your problem. If so, can you restate it and tell me what version of Flex and/or TLF you are using?

     

    Thanks,

     

    - robin

     
    |
    Mark as:
  • Currently Being Moderated
    May 30, 2011 6:45 AM   in reply to RoadtripRyan2

    I have exatly the same problem. Its easy to reproduce.

     

    Is there any solution??

     
    |
    Mark as:
  • Currently Being Moderated
    May 30, 2011 7:49 PM   in reply to i1234wewewew

    It's a pretty old discussion that I didn't dive in at that time. So can you please try the new flex SDK? If it can still be reproduced, feel free to let me know. Thanks!

     

    PS:

    please download newest sdk in http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.5

     

    In  {sdk basedir}/frameworks/rsls, there is textLayout_2.0.0.xxx.swf which  is the runtime shared library of tlf and shows tlf's detailed version.

    In  {sdk basedir}/frameworks/libs, textLayout.swc is also tlf library which  is used when the project is compiled with merge-into-code  configuration(default).

     
    |
    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