1 Reply Latest reply on Nov 30, 2010 2:56 PM by drkstr_1

    Question about skin component accessing class level var


      I have a custom skin based on spark List. Within the Declarations section of the skin class is a <fx:Component that declares the dropIndicator. I want to be able to set a style in my css to make the dropIndicator either visible or hidden. My skin can read in the value into a var, but the dropIndicator components is unable to access the var (defined in the script section). How can I get a component defined in the Declarations section access to a var defined in the script section?



        • 1. Re: Question about skin component accessing class level var
          drkstr_1 Level 4

          You can set a style on the host component and it will be available in the skin class.


          For example, If you set the style showContentGroup on the host component, you can access it in your skin like this:


          <s:Group id="contentGroup" visible="{getStyle('showContentGroup')}">


          You can also reference this.hostComponent in your skin, but if I understand your problem, then you can cut out the middle man using dynamic styles.