Loading ...
Sorry, an error occurred while loading the content.
 

Separate skin calsses for each Component?

Expand Messages
  • sony antony
    Hello All, I used skin class to apply icon on a button in my application. Is it like we have to create a separate skin class for each and every component?
    Message 1 of 2 , Jun 1, 2011
      Hello All,

      I used skin class to apply icon on a button in my application.
      Is it like we have to create a separate skin class for each and every component?
      Please guide me..

      Thanks and Regards :-)
    • bhaq1972
      You should use a style sheet (or tag) and use a styleName eg then in your style declaration have define a skin and
      Message 2 of 2 , Jun 3, 2011
        You should use a style sheet (or <fx:Style> tag) and use a styleName

        eg
        <s:Button styleName="MyButton"/>
        then in your style declaration have define a skin and an image
        <fx:Style>

        .MyButton{
        skinClass: ClassReference("SomeSkin");
        icon:Embed(source="MyButtonImage.png");
        }

        then in SomeSkin.mxml

        you can do something like this
        <s:BitmapImage source="{getStyle('icon')}"/>




        --- In flexcoders@yahoogroups.com, sony antony <pow_like_me143@...> wrote:
        >
        > Hello All,
        >
        > I used skin class to apply icon on a button in my application.
        > Is it like we have to create a separate skin class for each and every component?
        > Please guide me..
        >
        > Thanks and Regards :-)
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.