1 Reply Latest reply on Jul 3, 2010 9:18 AM by Jerry.Wang

    Spark RichEditableText: Add line number in the front of each line


      Hi, dear


      I am trying to customize the Spark TextArea for my Syntax Highlight Editor

      now I want to add the line number in the front of each line.


      something like:


      #001     Lorem ipsurr dolor sit amet,consecte adipiscing elit.

      #002     Praesentporttitor dolor et mauris blanceitin mperdiet nunc ultricies.

      #003     ivamus scelerisque puruseget nibh mattis ac tincidunt magna bibendum.  Sed



      So i am planning to do the following:


      First, I successfully to set the text padding the left and lineBreak


                  TextArea.textDisplay.setStyle( "paddingLeft", 30);
                  TextArea.textDisplay.setStyle( "lineBreak", LineBreak.EXPLICIT);


      Then, I wanna draw the line number to the background of the RichEditableText

      I find one way is "TextAreaSkin(TextArea.skin).background.fill = XXXX;"

      but then I found that the background is fixed,  I mean if I move the vertical scrollbar, the background is fixed there.


      So, how to draw the background for RichEditableText and the background is scroll with the text. not fixed.


      Any suggestion is welcome


      Thank you