Applying style for a menu item

274 views
Skip to first unread message

Vijendran

unread,
Mar 4, 2010, 8:08:25 AM3/4/10
to Flex India Community
Hi All,

I have a menu(on a right click) for a component in my app. I need to
italicise one of the menu item.

Here is the code that i am using:

#############################################

var myMenu:Menu = null;
var menuData:Array = null;

public function constructor(){
menuValue1 = "Alpha";
menuValue2 = "Beta";
menuValue3 = "Charlie"
menuValue4 = "Delta";
menuValue5 = "Echo";
menuData = [ {label: menuValue1, icon:icon1},
{label: menuValue2, icon:icon2},
{label: menuValue3, icon:icon3},
{label: menuValue4, icon:icon4},
{label: menuValue5, icon:icon5}
];
myMenu = Menu.createMenu(null, menuData, false);
}

public function handleRightClick():void{
myMenu.hide();
myMenu.show(x, y);
myMenu.addEventListener(MenuEvent.ITEM_CLICK,
handleMenuSelection);
}

#############################################

In the above example, i need to italicise menuValue3 ie, 'Charlie'.
Please help me in this regard.

Thanks,
Vijendran

jakir qureshi

unread,
Mar 4, 2010, 8:32:06 AM3/4/10
to flex_...@googlegroups.com
Hi use Css,Hope this work for u.

MenuBar
{
   
    background-size:        "100%";
    /* backgroundColor:         #d6d6d6; */
    borderColor:             #d6d6d6;
    /* fillAlphas:             1, 1; */
    fillColors:             #d6d6d6, #d6d6d6;
    color:                    #000000;
    disabledColor:             #000000;
    item-up-skin:            Embed("../Assets/blank.png");
     item-over-skin:            Embed("../Assets/MenuItem1.png", scaleGridTop="5", scaleGridBottom="23", scaleGridLeft="5", scaleGridRight="8");
    item-down-skin:            Embed("../Assets/MenuItem.png", scaleGridTop="5", scaleGridBottom="23", scaleGridLeft="5", scaleGridRight="8");
    horizontal-gap:            0;
    vertical-gap:            0;
    padding-bottom:            0;
    padding-left:            0;
    padding-right:            0;
    padding-top:            0;
    font-family:            Helvetica;
    font-style:             italic
    font-size:                11px;
    menu-style-name:         "myMenu";
}

.myMenu
{
    background-color:        #ffffff;
    font-family:            Helvetica;
    color:                    #000000;
    disabled-color:            #aca899;
    roll-over-color:        #316ac5;
    selection-color:        #316ac5;
    text-roll-over-color:    #FFFFFF;
    text-selected-color:    #FFFFFF;
    alternating-item-colors:#FFFFFF, #FFFFFF;
    font-weight:            normal;
    font-size:                11px;
    border-color:            #aca899;
    horizontal-gap:            0;
    vertical-gap:            0;
    padding-bottom:            0;
    padding-left:            0;
    padding-right:            0;
    padding-top:            0;
    text-align:                left;
    separator-skin:            Embed("../Assets/separator.png");
}


--
You received this message because you are subscribed to the Google Groups "Flex India Community" group.
To post to this group, send email to flex_...@googlegroups.com.
To unsubscribe from this group, send email to flex_india+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.




--
Thanks & Regards

Jakir M. Qureshi
Software Engineer

Vijendran

unread,
Mar 8, 2010, 1:48:56 PM3/8/10
to Flex India Community
Reply all
Reply to author
Forward
0 new messages