简体   繁体   中英

How can I implement a itemRenderer on my MenuBar in Flex 4?

I'm trying to make a menubar with an itemrenderer of linkbuttons. How could I go by doing this? Here is what my code looks like so far, but I can't seem to get it working.

<mx:MenuBar id="menuBar" labelField="@label" dataProvider="{menus}" itemRenderer="mx.controls.LinkButton">

</mx:MenuBar>

Use the MenuBarItemRenderer property instead of itemRenderer, which is not defined on the MenuBar class and will most likely throw a compile time error.

If that is not your solution, you'll have to quantify "can't seem to get it working." Are you seeing a compile errors? Or runtime error? Or experiencing unexpected behavior?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM