2 Replies Latest reply on May 31, 2010 3:26 AM by vivoices

    Custom <s:ToggleButton> Skin

    vivoices Level 1

      I started with a copy of the default skin class.

      The lines:

       

          <!-- text -->
          <s:Label id="labelDisplay"
                   textAlign="center"
                   verticalAlign="middle"
                      maxDisplayedLines="1"
                   horizontalCenter="0" verticalCenter="1"
                   left="10" right="10" top="2" bottom="2">
          </s:Label>
      

       

      display a different text for each instance of <s:ToggleButton label="x"><s:ToggleButton label="y"> . . .

       

      How do I have to code the custom skin to be able to assign an "unselectedIcon" and "selectedIcon" to each instance of a <s:ToggleButton> ?

      As in:

       

      <s:ToggleButton width="50" height="50"
                horizontalCenter="0" verticalCenter="0"
                unselectedIcon="EmbeddedResources.firstToggleIconUnselected"
                selectedIcon="EmbeddedResources.firstToggleIconSelected"
                skinClass="Skins.CustomToggleButtonSkin" />
      <s:ToggleButton width="50" height="50"
                horizontalCenter="60" verticalCenter="0"
                unselectedIcon="EmbeddedResources.secondToggleIconUnselected"
                selectedIcon="EmbeddedResources.secondToggleIconSelected"
                skinClass="Skins.CustomToggleButtonSkin" />
      

       

      Thanks for any help,

      David