Page 1 of 1

LabelPosition

Posted: Fri Nov 25, 2016 1:18 pm
by soa
I'm building a responsive app and I'd like to move a field's label from the left to the top but this doesn't reflow as I expect - the label just vanishes (I assume hidden by the field above) and the edit portion stays where it is. Is there a way to achieve this effect.

Re: LabelPosition

Posted: Fri Nov 25, 2016 2:37 pm
by davidbalansa
Did you increase the height of the field and set the MarginTop property to provide space for the caption to show?

If It is being hidden by the field above you really should be using a Layout Manager like the Table Layout to control the positioning of your fields.

David

Re: LabelPosition

Posted: Fri Nov 25, 2016 3:31 pm
by soa
I'm using a layout manager with all the items aligned top left, flow down. In the IDE when I change the position of the label from left to top the height is automatically calculated and the whole field shifts to the left. In the web this doesn't happen. Even if I, in code, changed the height of the control it still leaves a space to the left where the label used to be.

Re: LabelPosition

Posted: Fri Nov 25, 2016 4:30 pm
by Stewart Marshall
When you change the position of the label in the IDE, we change other properties so that the field lays out correctly. This is a design time courtesy that we can offer because you're in the middle of a designer.

The runtime however, be it web or desktop, has no such luxury. It can only do what you tell it to do.

The good news is that it's a very simple process to achieve what you want.

Have a look at the tip I've just posted.

http://vlforum.lansa.com.au/viewtopic.php?f=4&t=1143

Regards