It sounds like you are looking for a CSS Selector that will not apply to 
every Button instance, but only vanilla ones. Is there a selector that 
does that?

Alternatively, can you make your own custom Button Element (MyButton), 
by extending (inheriting from) the base Button class, then apply the CSS 
rule to your own custom Button?

I'm actually very interested in the answers to these questions, since I 
haven't had the time to play much with Flex 2.0 yet :-)

Example of what I'm saying:
<mx:Style>
MyButton {
    icon:Embed(source="icon.png");
}
</mx:Style>
<mx:MyButton />

or is something like this possible to set up?

<mx:Style>
MyNS|Button {
    icon:Embed(source="icon.png");
}
</mx:Style>
<MyNS:Button />



Thanks,

Kevin N.



Igor Costa wrote:
> Hi Guys
>
>
> I was trying to apply some CSS on application at my development cycle 
> and discovered a new unknown issue for Flex 2.0
>
> Here we go.
>
> When I create a new Style tag at the root of my Application.mxml here 
> we have
>
> <mx:Style>
>       .MyCostumButton { 
>                    icon:Embed(source="icon.png");
>     }
> </mx:Style>
>
> So applying directly to my button by attribute 
> styleName="MyCostumButton" does properly works.
>
> <mx:Button styleName="MyCostumButton" label="Costum icon by CSS"/>
>
> But in when we try to apply directly to a Button tag in CSS tag style 
> doesn't really work perfectly due to If I add a new component like 
> RichTextEditor every single button or any one who also has an costum 
> Button wrote by Actionscript our even MXML will appear the Icon in 
> each of them.
>
> Here we have, take a try
>
> <mx:Style>
>     Button {
>                icon:Embed(source="icon.png");
> </mx:Style>
>
> <!-- Now add whatever component you want that has some nativly events 
> like DateChooser, RichTextEditor,  colorChooser, comboBox. ... -->
>
> <mx:RichTextEditor>
> </mx:RichTextEditor>
> <mx:Button/>
> <mx:DateChooser>
> </mx:Datechooser>
>
>
> So, please Adobe Flex team fix this dude.
>
>
> Regards
>
>
> -- 
> ----------------------------
> Igor Costa
> www.igorcosta.com <http://www.igorcosta.com> 
>




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to