PDA

View Full Version : Ext-Gwt Layouts problem



daroo1987
4 Mar 2012, 5:24 AM
Hi,

I have a problem with understanding Ext-Gwt Layouts behaviour.

My task is following:

I would like to put two rows of buttons on the center of the page(horizontal and vertical). Buttons are used to choice of modules in my application and have bigger size(20% width, 20% height) than normal.

I have tried do this by using Vertical Panel with two HorizontalPanel and by VBoxLayout with HBoxLayout but without succeed. What is the best way (layout) to achieve this? I have noticed that when I set VBoxLayout to LayoutContainer and add a few buttons my page shows nothing.

For example what is wrong with following code, why page is blank?


LayoutContainer l = new LayoutContainer();
VBoxLayout vBoxLayout = new VBoxLayout();
l.setLayout(vBoxLayout);
l.add(adminButton);
l.add(logButton);
l.add(planButton);
l.add(magButton);
l.add(dispButton);
l.add(szkButton);

RootPanel.get().add(l);


Another question is: what is the best way to set buttons size(css whether code by setSize(20%,20%). I would be grateful for some help.