2 Replies Latest reply on Jan 12, 2011 8:31 AM by miguelportilla

    How do I dynamically change padding of a Label?

    miguelportilla
      With the following code I get a "Type
      1119: Access of possibly undefined property paddingTop through a reference with static type spark.components:Label."

      How do I go about changing the padding values of my Label in my function myUpdateComplete?


      <fx:Script>
      <![CDATA[
      public function myUpdateComplete():void
      {     
      txt.paddingTop=10;
      }
      ]]>
      </fx:Script>

      <s:Group width="500" height="36">                    
      <s:Label id="txt" text="This is a test" />                    
      </s:Group>