darrenan
March 22nd, 2023, 18:22
I have two controls set up like this:
<genericcontrol name="columnanchor">
<!-- <anchored height="0">
<top offset="40" />
<left offset="30" />
<right offset="-30" />
</anchored> -->
<anchored position="insidetop" offset="-30,40" />
<disabled />
<invisible />
</genericcontrol>
<stringcontrol name="instructions_label">
<font>sheetlabel</font>
<nodrag />
<readonly />
<anchored height="40">
<top parent="columnanchor" anchor="bottom" relation="relative" offset="7" />
<left parent="columnanchor" anchor="left" />
<right anchor="right" />
</anchored>
<multilinespacing>20</multilinespacing>
<static textres="pc_label_parse_instructions" />
</stringcontrol>
If I change the <right> anchor of "instructions_label" to <right parent="columnanchor" anchor="right" /> then the control disappears. I've tried this with both of the anchoring schemes in columnanchor and see the same behavior. I simply want the stringcontrol to be anchored to the left and right extents of the columnanchor control. What am I missing/doing wrong?
Obviously I could just directly set the offset= on the <right> element to a static value, which seems to work fine. I'm just wondering why the approach above isn't working. I feel like I'm missing something obvious.
<genericcontrol name="columnanchor">
<!-- <anchored height="0">
<top offset="40" />
<left offset="30" />
<right offset="-30" />
</anchored> -->
<anchored position="insidetop" offset="-30,40" />
<disabled />
<invisible />
</genericcontrol>
<stringcontrol name="instructions_label">
<font>sheetlabel</font>
<nodrag />
<readonly />
<anchored height="40">
<top parent="columnanchor" anchor="bottom" relation="relative" offset="7" />
<left parent="columnanchor" anchor="left" />
<right anchor="right" />
</anchored>
<multilinespacing>20</multilinespacing>
<static textres="pc_label_parse_instructions" />
</stringcontrol>
If I change the <right> anchor of "instructions_label" to <right parent="columnanchor" anchor="right" /> then the control disappears. I've tried this with both of the anchoring schemes in columnanchor and see the same behavior. I simply want the stringcontrol to be anchored to the left and right extents of the columnanchor control. What am I missing/doing wrong?
Obviously I could just directly set the offset= on the <right> element to a static value, which seems to work fine. I'm just wondering why the approach above isn't working. I feel like I'm missing something obvious.