You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Hugo Ferreira (JIRA)" <ji...@apache.org> on 2013/11/03 17:59:17 UTC
[jira] [Commented] (FLEX-33858) MenuItemRenderer in childs
[ https://issues.apache.org/jira/browse/FLEX-33858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13812418#comment-13812418 ]
Hugo Ferreira commented on FLEX-33858:
--------------------------------------
I found the solution.
The problem is that the MenuCoreItemRenderer is the responsible to create the menu childs (sub-menus of the menu) and uses as default renderer the own MenuCoreItemRender.
In my custom menu item renderer (assuming the name MyCustomItemRenderer for this sample) that extends MenuCoreItemRenderer I added the following code and solved the problem:
protected override function createMenu():Menu
{
var menu:Menu = super.createMenu();
menu.itemRenderer = new ClassFactory(MyCustomMenuItemRenderer);
return menu;
}
Now after create the sub-menu, the code applies the custom item renderer in every child.
> MenuItemRenderer in childs
> --------------------------
>
> Key: FLEX-33858
> URL: https://issues.apache.org/jira/browse/FLEX-33858
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: Menu
> Affects Versions: Apache Flex 4.11.0
> Environment: - MacOSX
> - AIR 3.9
> - Flash Builder 4.7
> Reporter: Hugo Ferreira
> Priority: Critical
> Attachments: Menu.fxp, Menu.png, Sub-menu.png
>
>
> The menu itemrenderer works with the first level of the spark Menu but it's completly ignored for his childs.
--
This message was sent by Atlassian JIRA
(v6.1#6144)