Kildary Klein
Kildary Klein

Reputation: 65

How to ensure the creation of the main menu without clicking on its items?

I need to access the widgets from the MMenu instance, from my application's main menu, but I found that the menu items are only created when displayed for the first time, when clicking on the menu item.

Is there a way to force the creation of all main menu widgets without having to click on all the items on the first level of the menu?

Note: I need to access the items because my application copies some items from the main menu to my main toolbar.

I tried creating the items by calling MenuManagerRenderer.createWidget( mMenu, mainMenuParent ). But the result was not what was desired. Items were duplicated, items that shouldn't be visible became visible, etc.

Ideally, the creation of items should be done in the same way as when we first clicked on the menu item.

Upvotes: 1

Views: 49

Answers (0)

Related Questions