Expand my Community achievements bar.

Align textfield on seperation line between caption and value

Avatar

Level 2

Is there anyway to align textfields on the seperation between the caption and value so the fields would be vertically aligned on this position?  I can't even find the position of the line in the object dialog.

Thanks, doug

6 Replies

Avatar

Level 10

The only way is to insert a Text (Label) on top of the field...

Avatar

Level 2

Could you please expand I'm new to designer? Thanks doug

Avatar

Level 10

Well, if I understand, you want to have the caption above the textfield instead of having it on the left side right?

Avatar

Level 2

Not exactly, textfields are made up of a value and caption and there is a line in the GUI seperating the two.  I would like to have that line be aligned vertically so they look like this

example alignment.pngthanks, Doug

Avatar

Level 10

Well depending on the position X of your textfields you may set the width of the caption to a dynamic width

//static

this.caption.reserve = "123mm";

//dynamic

var intWidth = (parseFloat(TextField2.x) - parseFloat(this.x)) + parseFloat(TextField2.caption.reserve);

this.caption.reserve = intWidth.toString() + "mm";

If you have textfields at the same position (x) you can set the position reserve in the layout palette to be all the same

Avatar

Level 2

I have tried "If you have textfields at the same position (x) you can set the position reserve in the layout palette to be all the same" and it does not appear to give the horizontal alignment I'm looking for at the divider between the caption label and the value field for each element vertically.  Can you provide more details?

Doug