You can create a relationship between a group of shape, line, image, and/or dynamic panel widgets in which only one widget at a time can be set to its selected state with the Set Selected/Checked action. When a widget in the group is set to its selected state, all others are automatically deselected. (This is similar to the relationship between radio buttons in a radio group.)
Creating Selection Groups
- Select one or more widgets on the canvas or in the Outline pane.
- In the More Properties menu in the Interactions pane, enter a name for the new selection group in the Assign Selection Group field.
- Add more shapes to the radio group by selecting them and choosing the selection group name in the Assign Selection Group dropdown.
- Remove a shape from the selection group by selecting it and clearing the Assign Selection Group field's selection.
Setting a Widget to Its Selected State
Adding widgets to a selection group is just the first step. To make use of the selection group, you'll need to create interactions that set the widgets to their selected states using the Set Selected/Checked action. A common example would be clicking a widget to select it, using the widget's OnClick event.
You can then change the widgets' style properties with the :selected style effect, which makes a widget look different when it's in the selected state.
You can also set up other interactions to occur when a widget enters or exits its selected state. For this, use the OnSelected, OnUnselected, and OnSelectedChange events.