majain
10-18-2008, 08:43 PM
I'm using gxt-1.1.1 release and the following code snippet doesn't seem to be setting the width of the TextField as coded:
FormPanel loginForm = new FormPanel();
loginForm.setHeading( "Login" );
loginForm.setFrame( true );
loginForm.setWidth( "425px" );
// Login
TextField<String> txtLogin = new TextField<String>();
txtLogin.setFieldLabel( "Login" );
txtLogin.setWidth( "50px" );
loginForm.add( txtLogin );
// Password
TextField<String> txtPassword = new TextField<String>();
txtPassword.setFieldLabel( "Password" );
txtPassword.setWidth( "100px" );
txtPassword.setPassword( true );
loginForm.add( txtPassword );
// Add menu to the RootPanel
RootPanel.get().add( loginForm );
:
No matter what I set for the Width attribute, it doesn't work.
Can someone tell me if I'm missing anything.
Thanks,
Majain
FormPanel loginForm = new FormPanel();
loginForm.setHeading( "Login" );
loginForm.setFrame( true );
loginForm.setWidth( "425px" );
// Login
TextField<String> txtLogin = new TextField<String>();
txtLogin.setFieldLabel( "Login" );
txtLogin.setWidth( "50px" );
loginForm.add( txtLogin );
// Password
TextField<String> txtPassword = new TextField<String>();
txtPassword.setFieldLabel( "Password" );
txtPassword.setWidth( "100px" );
txtPassword.setPassword( true );
loginForm.add( txtPassword );
// Add menu to the RootPanel
RootPanel.get().add( loginForm );
:
No matter what I set for the Width attribute, it doesn't work.
Can someone tell me if I'm missing anything.
Thanks,
Majain