1 Reply Latest reply on Feb 23, 2009 11:43 PM by Richard_Abbott

    Type selector styles

    Richard_Abbott Level 3
      Hi all,
      I am using mx:Style to apply a style sheet in my Flex app. I had applied a type selector saying (among other things)
      color: #ffffff;
      which works for buttons as they also have skinned coloured backgrounds.
      However, since RadioButton is descended from Button, my radio button text has also gone white. Is there an easy way to make the Button type selector not propagate to subclasses? Obviously I could put in a specific type selector change for RadioButton, but the problem would remain for any other subclass and I don't really want to try to anticipate all the subclasses I might use. The other thing that comes to mind is to use a class name and attach this to all the buttons I want, but the type selector seemed more convenient.
      Thanks in advance,
        • 1. Re: Type selector styles
          Richard_Abbott Level 3
          Just to tie this one up, I found out in the end that using the type selector style for Button has all kinds of knock-on effects, such as changing the appearance of Alert boxes. So the most appropriate way turned out to be to define a class name and use the Button's styleName property to attach it. I supopse that using type selectors in this way only really works if you take the trouble to develop a theme across the whole application?