Troubles with relative/current positioning
I'm back. I need to build a form with some fields that can be hidden.
So I decided to use relative. What you see here are not all the fields of the form, but they are the first ones. Beyond there will be those to hide and other additional fields.
I have a label with a stringfield next to it.
Under these another label and another stringfield. Everything works fine except for the last strigfield.
Code:
First label
<anchored to="leftanchor">
<top parent="leftanchor" anchor="bottom" relation="relative" />
<left />
</anchored>
First stringfield
<anchored to="leftanchor" width="90">
<top parent="leftanchor" anchor="top" relation="current"/>
<left parent="leftanchor" anchor="left" relation="relative" offset="70" />
</anchored>
Second label
<anchored to="leftanchor" >
<top parent="leftanchor" anchor="bottom" relation="relative" />
<left />
</anchored>
Second stringfield
<anchored to="leftanchor" width="420">
<top parent="leftanchor" anchor="bottom" relation="current"/>
<right parent="rightanchor" relation="absolute" offset="0" />
</anchored>
The two labels are positioned well, one below the other. The first stringfield is also positioned well, to the right of the first label. When I use anchor="bottom" in the second stringfield the control is positioned under the second label (obviously moved to the right), while if I use anchor="top" it is positioned at the level of the first two fields.
rightanchor is used only for right alignment. I tried without it and the problem is still there, so I guess it doesn't affect the misbehaviour.
What am I doing wrong or what do I not understand?