I assume I must add a id to any widget in my main.xml that I wish to receive events for.
My main.xml looks like:
<vbox style="padding: 5px;" width="100%" height="100%">
<hbox>
<checkbox id="check1" text="check 1" />
<checkbox id="check2" text="check 2" />
<checkbox id="check3" text="check 3" />
</hbox>
<hbox>
<optionbox id="radio1" text="radio 1" />
<optionbox id="radio2" text="radio 2" />
<optionbox id="radio3" text="radio 3" />
</hbox>
</vbox>
What do I pass to main.findComponent("the-id", ?)
to find the checkboxes and also for the radio buttons?
How can I tell when:
- a checkbox is checked, and unchecked?
- a radio button is selected?
Also, is there anything special required to group these radio buttons? They seem to automatically be grouped together, but I didn’t put them into any sort of “<buttongroup>
” element.
Thanks!