5 Replies Latest reply on Aug 13, 2009 6:51 AM by philip142au

    How to add box around text in s:TextArea?

    philip142au

      Hi,

       

      What I want to do is I want a red box to appear around some text in my s:TextArea, which is editable.

       

      Well, I can add a red box by putting the following after my text area.

       

        <s:Graphic>
          <s:Rect x="20" y="110" width="20" height="20" >
               <s:stroke>
                    <s:SolidColorStroke color="0xFF8888"/>
               </s:stroke>
          </s:Rect>
        </s:Graphic>

       

      However the user will edit the text, and the text position will change. Also the user will scroll the text area up and down.

      So the location of the box should move to still be located around the text.

       

      How can I track the position of the text? Is this a good idea? to track the position of the text and to keep moving the box to keep it on top of the text?

       

      Thanks, Philip