PDA

View Full Version : Cannot center button in a FormPanel



zaccret
15 May 2008, 2:09 AM
I cannot center a button in a FormPanel. Is it a bug ? Can anyone help ? Here is the code :

public void onModuleLoad() {
Viewport viewport = new Viewport();

FormPanel panel = new FormPanel();
panel.setFrame(true);
panel.setFieldWidth(210);
panel.setLabelWidth(100);
panel.setButtonAlign(HorizontalAlignment.CENTER);
panel.setHeading("Identification");
panel.setWidth(400);

TextField userTextField = new TextField();
userTextField.setFieldLabel("User name");
panel.add(userTextField);
TextField pwdTestField = new TextField();
pwdTestField.password = true;
pwdTestField.setFieldLabel("Password");
panel.add(pwdTestField);
panel.addButton(new Button("Submit"));

viewport.add(panel);

RootPanel.get().add(viewport);
}By the way, some border is missing on the bottom right of the frame. Bug also ?

zaccret
19 May 2008, 5:35 AM
In web mode, I don't have the border glitch, but the button is still not centered. Looks like a GXT bug? Do you agree, Darell ?

zaccret
21 May 2008, 12:09 AM
In beta3, the button is still not centered and the glitch is still here. Look at the jpeg.

zaccret
23 May 2008, 1:35 AM
After many trials, these issues really looks like bugs.
I have postponed the border issue in this new thread http://extjs.com/forum/showthread.php?p=172238 and the button centering issue here http://extjs.com/forum/showthread.php?p=172243.