Just to close this question and for the case that others have the same
problem: The solution is to wrap the MenuBar into a MenuItem:
userMenuItem = new MenuItem("User",new MenuBar(true));

The MenuItem is then added to the mainMenu. When trying to access the
elements of the new MenuBar you must first get the wrapped MenuBar by
calling userMenuItem.getSubMenu()

Hope this helps.
Robin

On Aug 20, 10:55 pm, Robin <[email protected]> wrote:
> Hi folks,
>
> I am trying to figure out how to remove a submenu from a menu.
> submenu.setVisible(false) does not work, and submenu.removeFromParent
> () does not work either. I figured, that the removeFromParent() method
> does not work because MenuBar does not implement HasWidgets. Is this
> right? And if yes, could anyone point me in the right direction on how
> to do this? Any help would be greatly appreciated!
>
> Thanks guys,
> Robin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to