PDA

View Full Version : TextField in CenterLayout



amirs
29 Nov 2008, 1:34 AM
Hello all,
I am trying to create a simple custom login dialog.
I created a FormPanel with a TextField and a ButtonBar.
At first the TextField would appear at the top of the form window and I couldn't find how to control its location so I changed the FormPanel's layout to CenterLayout.
Now, the TextField is indeed in the center but its label is missing, only the text box is visible.

Can anyone help me with this?
Thanks..

amirs
5 Dec 2008, 2:45 PM
I'm kind of stuck on this...

takayser
8 Dec 2008, 2:40 AM
Labels are only displayed on FormLayout. FormPanel will use FormLayout by default, most other use FlowLayout by default.
I suppose you put your textfield on a contentPanel and added this contentPanel to the CENTER Region without assigning a Layout to the contentPanel.
Solution: you have to assign FormLayout to this contentPanel.

myContentPanel.setLayout(new FormLayout());