View Full Version : label positioning
6 Apr 2010, 3:25 AM
If I add two labels to a formpanel, they appear on one line right next to each other. How can I convince the second label to position below the first one?
6 Apr 2010, 8:11 AM
Did you try set your formPanel with Absolute? Will give you freedom to put your label where you want.
6 Apr 2010, 11:52 AM
Bert if you can share your xds file we can offer some suggestions.
6 Apr 2010, 1:21 PM
I can, but try it yourself: start a new project, drop a formpanel on the canvas, drop 2 labels on the formpanel: the second one is to the right of the first one.
The trick with "absolute" works, but I have some reservations about this solution.
6 Apr 2010, 11:41 PM
Did you try "vbox"?
7 Apr 2010, 4:06 AM
I tried this and it behaves as you described, with the labels side-by-side. Odd, I would have expected the labels to be placed vertically too.
As others have said, you can get past this by changing the layout. If you really don't want to change the layout for the entire form panel, the typical way to do this is to add a container to the form panel, add the label to this container, and change the layout on it to be vbox or something.
In a pinch, if you really don't want to change the layout at all, you could probably get by with getting rid of the text property on the label and making the html Label:<br> . Perhaps not the most elegant, but I bet it would work.
Powered by vBulletin® Version 4.1.5 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.