tdewitt274
August 8th, 2010, 21:11
I was wondering if anyone could tell me if the below behaviour is correct.
I have some code that I'm trying to center align (<position>insidetop</position>) a stringcontrol and then center a numbercontrol below it (<position>below</position>). When I do this, the control seems as if it inherits the width of the genericcontrol (480, not the declared value).
<genericcontrol name="pointsframe">
<frame>
<name>sheetgroup</name>
</frame>
<anchored>
<to>abilitiesframe</to>
<position>belowleft</position>
<offset>0,5</offset>
<size>
<width>480</width>
<height>60</height>
</size>
</anchored>
</genericcontrol>
<stringcontrol name="creationpoints">
<anchored>
<to>pointsframe</to>
<position>insidetop</position>
<offset>15,10</offset>
<size>
<width>68</width>
<height>20</height>
</size>
</anchored>
<font>sheetlabel</font>
<static>Creation</static>
<center />
</stringcontrol>
<numberfield name="crpoints">
<anchored>
<to>creationpoints</to>
<position>below</position>
<offset>0,0</offset>
<size>
<width>35</width>
<height>20</height>
</size>
</anchored>
<font>sheettext</font>
<frame>
<name>modifier</name>
<offset>5,4,5,4</offset>
</frame>
<keyeditframe>
<name>sheetfocus</name>
<offset>5,4,5,4</offset>
</keyeditframe>
</numberfield>
Is there a better way of doing this? I would like to keep the controls centered, as I plan to have one set of controls on the right and left.
Thanks in advance!
I have some code that I'm trying to center align (<position>insidetop</position>) a stringcontrol and then center a numbercontrol below it (<position>below</position>). When I do this, the control seems as if it inherits the width of the genericcontrol (480, not the declared value).
<genericcontrol name="pointsframe">
<frame>
<name>sheetgroup</name>
</frame>
<anchored>
<to>abilitiesframe</to>
<position>belowleft</position>
<offset>0,5</offset>
<size>
<width>480</width>
<height>60</height>
</size>
</anchored>
</genericcontrol>
<stringcontrol name="creationpoints">
<anchored>
<to>pointsframe</to>
<position>insidetop</position>
<offset>15,10</offset>
<size>
<width>68</width>
<height>20</height>
</size>
</anchored>
<font>sheetlabel</font>
<static>Creation</static>
<center />
</stringcontrol>
<numberfield name="crpoints">
<anchored>
<to>creationpoints</to>
<position>below</position>
<offset>0,0</offset>
<size>
<width>35</width>
<height>20</height>
</size>
</anchored>
<font>sheettext</font>
<frame>
<name>modifier</name>
<offset>5,4,5,4</offset>
</frame>
<keyeditframe>
<name>sheetfocus</name>
<offset>5,4,5,4</offset>
</keyeditframe>
</numberfield>
Is there a better way of doing this? I would like to keep the controls centered, as I plan to have one set of controls on the right and left.
Thanks in advance!