You can specify a skin that the Menu uses as the separator. Check out
the separatorSkin style. There are examples of how to create graphical
skins (using Flash, Fireworks, etc) or programmatic skins (creating an
ActionScript file that draws the skin via the Flash drawing API) in the
Flex documentation - you then set the separatorSkin style to that skin. 


Also, this is a pretty expensive way to set styles on your Menu
instance. You should look into using CSS to specify your Menu's look and
feel. 

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of yourName
Sent: Thursday, January 10, 2008 2:17 AM
To: [email protected]
Subject: [flexcoders] Menu Seprator color

 

can one tell how to control the size and color of menu seprator

 

follwing is code snipet

 

private function createAndShow():void

{

var myMenu:Menu = Menu.createMenu(null, myMenuData, false);

myMenu.setStyle( "color" , "#7d9bc6" );

myMenu.setStyle( "fontSize" , "11" );

myMenu.setStyle( "fontWeight" , "bold" );

myMenu.setStyle( "fontFamily" , "Arial" );

myMenu.setStyle( "borderStyle" , "solid" );

/* myMenu.setStyle( "borderColor" , "#f69401" ); */

myMenu.setStyle( "rollOverColor" , "white" );

myMenu.setStyle( "cornerRadius" , "5" ); 

myMenu.setStyle( "textRollOverColor" , "#f69401" ); 

myMenu.setStyle( "borderThicknessTop" , "1" );

myMenu.setStyle( "dropShadowEnabled" , "false" );

myMenu.setStyle( "selectionColor" , "#f69401" );

myMenu.setStyle( "menuseparator" , "#f69401" );

myMenu.labelField="@label";

myMenu.show(60, 90);

}

 

<mx:XML format="e4x" id="myMenuData">

<root>

<menuitem label="Create Model Manually" icon="myTopIcon" />

<menuitem type="separator"/> 

<menuitem label="Copy Model" icon="myTopIcon" />

<menuitem type="separator"/>

<menuitem label="Match Account" icon="myTopIcon" />

<menuitem type="separator"/>

<menuitem label="Import Model" icon="myTopIcon"/>

<menuitem type="separator"/>

<menuitem label="Edit Model" icon="myTopIcon"/>

<menuitem type="separator"/>

<menuitem label="Delete Model" icon="myTopIcon" />

<menuitem type="separator"/>

<menuitem label="Model List" icon="myTopIcon"/>

<menuitem type="separator" color="red"/> 

<menuitem label="Assign Model" icon="myTopIcon"/> 

</root>

</mx:XML> 

 

Reply via email to