maqjav
27 Aug 2010, 4:04 AM
Hello.
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);
panel.setHeading("TEXT");
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.add(panel);
popUp.setPopupPositionAndShow(new PositionCallback() {
@Override
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.
Thanks.
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);
panel.setHeading("TEXT");
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.add(panel);
popUp.setPopupPositionAndShow(new PositionCallback() {
@Override
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.
Thanks.