1 Reply Latest reply on Mar 23, 2009 10:22 AM by matthew horn

    button style affect color picker?

    run,ryan! Level 3
      I created a customied skin for button and included the style definition inapplication like this
      [code]
      Button
      {
      up-skin: ClassReference("com.CustomButton");
      over-skin: ClassReference("com.CustomButton");
      down-skin: ClassReference("com.CustomButton");
      selected-disabled-skin: ClassReference("com.CustomButton");
      selected-over-skin: ClassReference("com.CustomButton");
      selected-up-skin: ClassReference("com.CustomButton");
      }
      [code]
      the new style is applied to all the buttons, but also changed color picker. is color picker a subclass of button? how can i exclude color picker from this style definition?
        • 1. Re: button style affect color picker?
          matthew horn Level 3
          The color picker contains buttons in it (as "sub components"). By default, inheritable styles set on a selector are passed through the parent to the child components that match that selector.

          From the docs:
          If you do not want an inheritable style property to be applied to the subcontrol, you can override the parent's style by defining a custom class selector.

          You can also define a filter to remove style properties that you dont want inherited by sub controls. There's info on doing this here:
          http://livedocs.adobe.com/flex/3/html/styles_04.html

          hth,
          matt horn
          flex docs

          That means, on your color picker, do something like this:

          <mx:ColorPicker styleName="someOtherStyles"/>