PDA

View Full Version : Dialog without close icon (X)



phamtranquocviet
20 Oct 2008, 3:14 PM
Hi,
How do you get rid of the close icon (X) on the top right corner in a dialog?

Here is my code:
public class Login extends Dialog
{
private TextField<String> userName;
private TextField<String> password;

public Login()
{
makeGui();
}

private void makeGui()
{
makeForm();
makeUserName();
makePassword();
}

private void makePassword()
{
password = new TextField<String>();
password.setFieldLabel("Password");
password.setAllowBlank(false);
add(password);
}

private void makeUserName()
{
userName = new TextField<String>();
userName.setFieldLabel("Username");
userName.setAllowBlank(false);
add(userName);
}

private void makeForm()
{
FormLayout layout = new FormLayout();
layout.setLabelWidth(90);
layout.setDefaultWidth(155);
setLayout(layout);
setHeading("Login");
setButtons("");
setResizable(false);
}
}

Thanks.

phamtranquocviet
20 Oct 2008, 3:21 PM
Got it. Need to call setClosable(false) on the dialog. Thanks.