akashani
13 Feb 2009, 4:35 PM
Hi everyone,
I'm evaluating GXT to see whether it'll fit our company's needs. I've created the very simple layout below, which is basically a logo area above a nav bar area. The results are basically as I expect in IE, but not in FF or Chrome. Here's the code:
Viewport view = new Viewport();
view.setScrollMode(Scroll.AUTO);
LayoutContainer main = new LayoutContainer(new RowLayout(Orientation.VERTICAL));
main.add(new Label("Logo"));
LayoutContainer navbarLayout = new LayoutContainer(new RowLayout(Orientation.HORIZONTAL) );
navbarLayout.add(new Button("B1"));
navbarLayout.add(new Button("B2"));
navbarLayout.add(new Button("B3"));
navbarLayout.add(new Button("B4"));
navbarLayout.add(new Button("B5"));
main.add(navbarLayout, new RowData(-1, 48));
view.add(main, new MarginData(5, 0, 0, 0));
RootPanel.get().add(view);
The problem is that the buttons are being given a height of 10px in FF compared to 31px in IE. My understanding was that a RowLayout wouldn't size its children if no RowData was provided, yet they're being sized. Removing the erroneous height (through FireBug) fixes the issue.
Any ideas?
I'm evaluating GXT to see whether it'll fit our company's needs. I've created the very simple layout below, which is basically a logo area above a nav bar area. The results are basically as I expect in IE, but not in FF or Chrome. Here's the code:
Viewport view = new Viewport();
view.setScrollMode(Scroll.AUTO);
LayoutContainer main = new LayoutContainer(new RowLayout(Orientation.VERTICAL));
main.add(new Label("Logo"));
LayoutContainer navbarLayout = new LayoutContainer(new RowLayout(Orientation.HORIZONTAL) );
navbarLayout.add(new Button("B1"));
navbarLayout.add(new Button("B2"));
navbarLayout.add(new Button("B3"));
navbarLayout.add(new Button("B4"));
navbarLayout.add(new Button("B5"));
main.add(navbarLayout, new RowData(-1, 48));
view.add(main, new MarginData(5, 0, 0, 0));
RootPanel.get().add(view);
The problem is that the buttons are being given a height of 10px in FF compared to 31px in IE. My understanding was that a RowLayout wouldn't size its children if no RowData was provided, yet they're being sized. Removing the erroneous height (through FireBug) fixes the issue.
Any ideas?