Hello everybody.
I was trying to create a menubar that fits exactly on top/left of a window, without any gap between the menubar and the navigator, but without success.
Any ideas how to creat it to fit perfectly?
Thankz
Hello everybody.
I was trying to create a menubar that fits exactly on top/left of a window, without any gap between the menubar and the navigator, but without success.
Any ideas how to creat it to fit perfectly?
Thankz
I have a menu bar that does not have a gap in IE. I Add it to the main window using the following code. The extensions are to customize the tabsheet and menubar, but they extend the default menubar and tabsheet and nothing in them changes the display behavior. Hope this helps.
public class As4webApplication extends Application {
private Window _winMain = new Window("AS4Web");
private GridLayout _layoutMain = new GridLayout(1,2);
private DAMenuBar _menuBar = new DAMenuBar();
private DATabSheet _tabsheet = new DATabSheet();
public As4webApplication() {
}//constructor
@SuppressWarnings("serial")
@Override
public void init() {
setTheme("datheme");
Panel pnl = new Panel();
pnl.setContent(_layoutMain);
pnl.setScrollable(true);
pnl.setSizeFull();
_winMain.setContent(pnl);
_winMain.setSizeFull();
_winMain.setScrollable(true);
_layoutMain.setSizeFull();
_layoutMain.setRowExpandRatio(1,1);
_layoutMain.addComponent(_menuBar);
_layoutMain.addComponent(_tabsheet);
setMainWindow(_winMain);
//To get browser type, you can do this:
//WebBrowser browser = (WebBrowser) _winMain.getTerminal();
}//end init
I think the window automatically puts setMargin(true) on it’s predefined layout, even when layouts usually have magin: false as default. You have to manually turn it back to false with window.getContent().setMargin(false);, if that API is visible. Changing the layout should also work (window.setContent(new VerticalLayout());