Hello,
Maybe I'm doing something wrong but I can't make my MenuBar look like a normal menu bar, i.e. visible with 100% width on the NORTH of the page.
Here's my code:
I have the result of this in the screenshot attached.
The MenuBar is using 100% width, but only the menu part is visible. I want to have all the MenuBar visible on the top, with the same look & feel as the individual menu.
How can I do this?
Thanks in advance
Maybe I'm doing something wrong but I can't make my MenuBar look like a normal menu bar, i.e. visible with 100% width on the NORTH of the page.
Here's my code:
Code:
private MenuBar createMenu() {
MenuBar menuBar = new MenuBar();
menuBar.setWidth100();
Menu userMenu = new Menu();
userMenu.setShowShadow(true);
userMenu.setShadowDepth(10);
String username = controllers.getSecurityControl().getUserSession().getUsername();
userMenu.setTitle(username);
MenuItem logoutMenuItem = new MenuItem("Logout");
logoutMenuItem.addClickHandler(new ClickHandler() {
public void onClick(MenuItemClickEvent event) {
controllers.getSecurityControl().logout();
}
});
userMenu.setItems(logoutMenuItem);
menuBar.setMenus(userMenu);
return menuBar;
}
The MenuBar is using 100% width, but only the menu part is visible. I want to have all the MenuBar visible on the top, with the same look & feel as the individual menu.
How can I do this?
Thanks in advance
Comment