PDA

View Full Version : How do I use the radiogroup control?



DarkStar
August 20th, 2011, 11:23
Found it in the d20JPG ruleset but I have no idea how to use it. Could anyone drop an example (XML) of how to properly put the radiogroup control on the sheet with some example values?

Zeus
August 20th, 2011, 14:47
Here's an example:



<radiogroup name="exampleradiogroup">
<anchored> -- configure the position of the control
<top>
<anchor>top</anchor>
<offset>10</offset>
</top>
<left>
<anchor>left</anchor>
<offset>200</offset>
</left>
<size> -- set the height of the control
<height>20</height>
</size>
</anchored>
<font>sheetlabel</font> -- set a font for the control to use
<sourceless /> -- omit if you want the control to store its value in the db.
<parameters>
<optionwidth>100</optionwidth> -- sets the width of each option in the radio group
<labels>Option1|Option2|Option3</labels> -- sets the labels of the radio options
<values>option1|option2|option3</values> -- sets the values of the radio options
</parameters>
</radiogroup>


You can read the option set of a radiogroup using getStringValue() and set the option using setStringValue().