PDA

View Full Version : [GXT 1.0.1][Firefox]FormPanel display strange in FitLayout.



zsumore
21 Jul 2008, 11:54 PM
public void onModuleLoad() {

final ContentPanel panel = new ContentPanel();
panel.setLayout(new FitLayout());
panel.setSize(600, 400);
panel.addButton(new Button("one",
new SelectionListener<ComponentEvent>() {

@Override
public void componentSelected(ComponentEvent ce) {
panel.removeAll();

FormPanel form = new FormPanel();
form.setFieldWidth(200);
form.setLabelWidth(100);
form.setButtonAlign(HorizontalAlignment.CENTER);
form.addButton(new Button("one"));

panel.add(form);
panel.layout();

}

}));

RootPanel.get().add(panel);

}

In IE it is well ,but with firefox it is not well.

darrellmeyer
22 Jul 2008, 8:50 AM
I still need to investigate a little more. However, as a workaround you can set layout on change to true for the panel:


panel.setLayoutOnChange(true);