Skip navigation
gordon277
Currently Being Moderated

Spark Label Whitespaces

Oct 18, 2011 9:15 PM

Tags: #as3 #flex #label #spark

Hi,

 

Does anyone know how to make it so that the Spark Label doesn't automatically trim whitespaces? For example

 

<s:Group y="200">

        <s:layout>

            <s:HorizontalLayout />

        </s:layout>

        <s:Label text="hello1" />

        <s:Label text="                "/>

        <s:Label text="hello2" />

    </s:Group>

 

The 2nd label will not show up. Or if I set it in code like this:

 

label.text = "hello                  ";

The trailing spaces will not show up in the label.

 

The reason I'm doing this is so that I can create dynamic text that I can switch out, highlight, make clickable, etc... Stringing labels together is the best way I can think of doing it.

 

Thanks

 
Replies

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