Hi,

You can use style tag as shown below, not sure why you got errors. Which
version of Flex you are using?


You can see into flex docs under section "Using Styles and Fonts":

http://livedocs.macromedia.com/flex/15/flex_docs_en/00000532.htm



##StyleTagExample.mxml##

<mx:Application width="800" height="600"
xmlns:mx="http://www.macromedia.com/2003/mxml";>
    <mx:Style>
    
     LinkBar {
        
            color:#000000;
            border-style:solid;
            background-color:#0000FF;
            textRollOverColor:#FF0000;
        }

        .myStyle {

                color:#FF0000;
                font-family:Georgia;
        }
    
    </mx:Style>
    
    
   <mx:LinkBar
        click="getURL('http://www.macromedia.com/' +
String(event.label).toLowerCase(), '_blank');" >
         <mx:dataProvider>
            <mx:Array>
                <mx:String>Flash</mx:String>
                <mx:String>Director</mx:String>
                <mx:String>Dreamweaver</mx:String>
                <mx:String>ColdFusion</mx:String>
            </mx:Array>
        </mx:dataProvider>
    </mx:LinkBar>

<mx:Button label="aButton" styleName="myStyle" />
</mx:Application>


Hope that helps..

-abdul





-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cnewroth55
Sent: Thursday, May 19, 2005 11:20 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] using the Style control tag

not sure if anyone else knows this, but I tried to use the 
<mx:Style> tag to set a style in one of my components, and when I 
did i got an error that said "CSS type selectors are not supported 
in components", here is what I had:
<mx:Style>
LinkBar {some style stuf
}
</mx:Style>

however this is wrong and the error message was kind of misleading, 
based on it i thought that i could NOT use the tag/style in a 
component;
but when I changed it to this;
<mx:Style>
myLinkBar.LinkBar {some style stuff
}
</mx:Style>
noticed i added a ID to the LinkBar style it worked just fine...just 
thought someone might what to know...
Craig





 
Yahoo! Groups Links



 




 
Yahoo! Groups Links

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

<*> 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