Thank you for the example file, Kelly. Turns out I was doing it
correctly, it's just that I was trying to get the icon to appear on
the root menuitem. As soon as I moved the icon to one of the sub
menuitems, it appeared with no problems.

My intentions were to have icons in the root menuitems, but I gather
this is not natively built-in and would require some sort of workaround?


--- In [email protected], "Devin Holloway" <[EMAIL PROTECTED]> wrote:
>
> I don't quite understand this solution. Mind showing a more complete
> code example? thanks
> 
> 
> --- In [email protected], "Kelly Birr" <kelly.fx@> wrote:
> >
> > I found my problem.  It appears that the menu cannot bind to static
> vars for
> > images.  I solved the problem by specifying 
> > { public const myMenuIcon:Class = GlobalIcons.MyCoolIcon; }  where
> > GlobalIcons.MyCoolIcon is declared exactly as below. Then pout the
local
> > name "myMenuIcon" in the @icon field of the xml.
> >  
> > - Kelly
> > 
> >   _____  
> > 
> > From: [email protected]
[mailto:[EMAIL PROTECTED] On
> > Behalf Of Kelly Birr
> > Sent: Wednesday, June 28, 2006 4:26 PM
> > To: [email protected]
> > Subject: [flexcoders] Icons in menu - not working
> > 
> > 
> > I've been racking my brain trying to get icons in the menu bar.  I
> think I'm
> > doing exactly what the docs say but I cannot get any icon to render.
>  The
> > label and actions work perfectly but the icon does not show up.  The
> icon is
> > embedding properly as I can see it in the "icon" property of a
> button in the
> > same file.  I've also tried putting the path to the icon file in the
> xml, no
> > joy.
> >  
> > My Menu XML Is:
> > <menu>
> >     <menuitem label="File">
> >         <menuitem label="Open" data="File!Open"  />
> >         <menuitem type="separator" />
> >         <menuitem label="Exit" data="File!Exit" icon="exitOn" />
> >     </menuitem>
> > </menu>
> >  
> > My MXML is:
> > <mx:Script>
> >   <![CDATA[
> >         [Embed(source="images/icons/iconExitOn.gif")]
> >         public static const exitOn:Class;
> >   ]]>
> >  </mx:Script>
> > 
> >  <mx:MenuBar id="menu" width="100%" x="0" y="0" height="27"
> > dataProvider="{menuXml}" showRoot="false" 
> >    cornerRadius="3" itemClick="menuHandler(event)" labelField="@label"
> > iconField="@icon" />
> > 
> >     
> > I cannot find any samples anywhere with icons in the menu,  Is this
> still
> > supported?  Can anyone tell me what i'm doing wrong?  I am using
> Flex 2.0
> > RTM
> >  
> > - Kelly
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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

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