Radiobuttons are a bit trickier than checkboxes. For one thing, the GUI setup requires both Set and Reset branch events, but the Reset branch event is not automatically activated. In fact, it isn't even triggered. What this means is that the Set event happens, but the Reset event only happens if you actually code it within the Set event.
In keeping with our previous landscape scene, choosing Draw Sun will not automatically Erase Cloud. The Erase Cloud routine must be included in the Draw Sun routine. What the automatic coding will do is keep only one radiobutton in the visibly Set status. You, the coder, must program both Set and Reset events in the Set handlers.
There is no toggling involved with a radiobutton. A click sets that button. Repeated clicks continue to set.
BUT... only one radiobutton may be in Set status at any one time. As you click the radiobuttons, watch to see the selected radiobutton assume Set status, with all others assuming Reset status.
At this point, the output doesn't correlate with the radiobutton status. The coding allows one of each of the three pairs of images to be displayed, but there is only one button displaying Set status at any one time.
Question: How can we code for three separate but distinct choices? Answer: Groupboxes
What is a Radiobutton?
Radiobuttons are a bit trickier than checkboxes. For one thing, the GUI setup requires both Set and Reset branch events, but the Reset branch event is not automatically activated. In fact, it isn't even triggered. What this means is that the Set event happens, but the Reset event only happens if you actually code it within the Set event.
In keeping with our previous landscape scene, choosing Draw Sun will not automatically Erase Cloud. The Erase Cloud routine must be included in the Draw Sun routine. What the automatic coding will do is keep only one radiobutton in the visibly Set status. You, the coder, must program both Set and Reset events in the Set handlers.
There is no toggling involved with a radiobutton. A click sets that button. Repeated clicks continue to set.
BUT... only one radiobutton may be in Set status at any one time. As you click the radiobuttons, watch to see the selected radiobutton assume Set status, with all others assuming Reset status.
At this point, the output doesn't correlate with the radiobutton status. The coding allows one of each of the three pairs of images to be displayed, but there is only one button displaying Set status at any one time.
Question: How can we code for three separate but distinct choices? Answer: Groupboxes