View Full Version : [2.2.0 Beta] RowLayout with Orientation.HORIZONTAL doesn't work everytime

27 Aug 2010, 4:04 AM

I'm having some troubles with this layout in different applications and with things that were working in previous versions of GXT.

Here is a simple example where Orientation.HORIZONTAL is ignored and all the items are added with VERTICAL orientation.

PopupPanel popUp = new PopupPanel();

ContentPanel panel = new ContentPanel(new AbsoluteLayout());
panel.setSize(450, 330);

LabelToolItem name = new LabelToolItem("User name");
name.setStyleName("black11 bold");
LabelToolItem password = new LabelToolItem("Password");
password.setStyleName("black11 bold");
LabelToolItem rePassword = new LabelToolItem("Rewrite password");
rePassword.setStyleName("black11 bold");

LayoutContainer row = new LayoutContainer(new RowLayout(Orientation.HORIZONTAL));
row.setSize(460, 16);
row.add(name, new RowData(220, 1));
row.add(password , new RowData(110, 1));
row.add(rePassword , new RowData(110, 1));

panel.add(row, new AbsoluteData(10, 20));

popUp.setPopupPositionAndShow(new PositionCallback() {

public void setPosition(int offsetWidth, int offsetHeight) {
popUp.setPopupPosition(Window.getClientWidth() / 2 - 230, Window.getClientHeight() / 2 - 165);

Edit: This problem exists only with Chrome, not with Internet Explorer.


27 Aug 2010, 4:19 AM
The popuppanel is hidden while it gets shown. You need to add
panel.layout(true); as last line.

27 Aug 2010, 4:28 AM
Great!, it's working now sven.

Thank you.

27 Aug 2010, 4:45 AM
I am looking for a change so that this is not needed anymore.