Thanks.  This will give me a good starting point.

--- In [email protected], "Tim Hoff" <timh...@...> wrote:
>
> 
> An easy way would be to extend MenuBar:
> 
> package
> {
>       import mx.controls.Menu;
>       import mx.controls.MenuBar;
>       import mx.core.ClassFactory;
> 
>       public class MyMenuBar extends MenuBar
>       {
> 
>            public function MyMenuBar()
>            {
>                 super();
>            }
> 
>            override public function getMenuAt( index:int ) : Menu
>            {
>                 var menu:Menu = super.getMenuAt( index );
>                 menu.styleName = "myMenuItemRendererStyleName";
>                 menu.itemRenderer = new ClassFactory( MyMenuItemRenderer
> );
> 
>                 return menu;
>            }
>       }
> }
> 
> -TH
> 
> --- In [email protected], "lampei" <lampei@> wrote:
> >
> > I'm trying to create a custom itemrenderer for the sub menus of an
> itemrenderer, but am running into some issues...the main one being that
> I cannot seem to access the sub menus to create them.
> >
> > The docs state:
> > You can define an item renderer for the pop-up submenus of the MenuBar
> control. Because each pop-up submenu is an instance of the Menu control,
> you use the class MenuItemRenderer to define an item renderer for the
> pop-up submenus. To set the item renderer for a pop-up submenu, access
> the Menu object using the menus property.
> >
> > However, I'm having trouble trying to figure out when the menus have
> been set, and how to change their itemrenderer once I *do* get the check
> working.
> >
> > Anyone have any insight into how to accomplish this? It seems to be
> pretty straight forward...when menus has values, set an itemrenderer on
> the items within it.
> >
> > Thanks.
> >
>


Reply via email to