Welcome, Guest
  • Author Topic: Using two panels with different colors ??? while using a Skin  (Read 3180 times)

    aktell

    • Server what's that
    • *
    • Posts: 16
      • View Profile
      • Email
    Hi there,

    I’m running into problems with my app. Please can somebody give some advice?

    I’m using a normal standard namespace (mx:Panel) component and a Skin in the whole app. Now I require to use another (mx:Panel) component and this has to have another color from the first Panel.

    Thanks in advance aktell

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Use styles for components customization, it's easy, follow the CSS syntax and is fully documented or each component

    Jorge

    aktell

    • Server what's that
    • *
    • Posts: 16
      • View Profile
      • Email
    Hi there,

    I don't understand. Within the Skin I have (mx:Panel) which is overriding everything of the same. Therefore how could I use (mx:Panel again with CSS.

    Maybe You could give an excample ???

    Regards aktell

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    For all panels is something like this:

    Code: [Select]
    <mx:Style>
         Panel
         {
          borderColor: #cccccc;
            backgroundColor: #cccccc;
            themeColor: #cccccc;
         }
    </mx:Style>

    This affects all panels, but here I have a couple of differents styles

    Code: [Select]
    <mx:Style>
         myPanel1
         {
          borderColor: #cccccc;
            backgroundColor: #cccccc;
            themeColor: #cccccc;
         }
         myPanel2
         {
          borderColor: #cccccc;
            backgroundColor: #cccccc;
            themeColor: #cccccc;
         }
    </mx:Style>

    To apply, select your panel, and in style select the desired style (or directly in mxml, add styleName="myPanel2" )

    Jorge