1 Reply Latest reply on Nov 17, 2010 10:13 AM by Flex harUI

    How to make Label not cut off blank?

    deadblue_tomo

      My Question:

      When I use "spark.components.Label" to display string, the blank at string's end didn't display.But I need display the blank.

      How can I make that?

       

      SDK: Flex 4.0 SDK(build 14159)

       

      Sample Code:

      import spark.components.Label;

       

      var label1:Label = new Label();

      label1.setStyle("backgroundColor", 0x00ff00);

      label1.text = "some text    ";     // There is some space at end of the strin

      someBox.addChild(label1);

      label1.y = 0;

       

      var label2:Label = new Label();

      label2.setStyle("backgroundColor", 0x00ff00);

      label2.text = "some text";

      someBox.addChild(label2);

      label2.y = 30;

       

      // The two labels displayed in same width at all