SetSelectedRadioButtons
int SetSelectedRadioButtons (int panelHandle, int activeButton, int numButtons, ...);
Purpose
This function ensures that only one radio button in a group of radio buttons in a CVI user interface is set to the On state.
Specify the active button and a list of buttons. This list of buttons can also include the active button.
The active button is set On and all other buttons are set Off.
Use the GetSelectedRadioButtons function to determine which radio button is set to the On state.
![]() |
Note This function affects radio buttons on a toggle button control, not the radio button group or flexible radio button group. Because the radio button group and flexible radio button group controls are configured to look and behave like a group of mutually exclusive radio buttons, consider using those controls and associated functions instead of this function. |
Parameters
Input | ||
Name | Type | Description |
panelHandle | int | The specifier for a particular panel that is currently in memory. You obtain the handle by calling the LoadPanel, NewPanel, or DuplicatePanel function. |
activeButton | int | Pass the control ID of the radio button that you want to set to the On state. |
numButtons | int | Specify the number of radio buttons that you pass in the listOfAllRadioButtons parameter. |
listOfAllRadioButtons | ... | Pass a comma separated list of control IDs for each radio button in the radio button group. |
Return Value
Name | Type | Description |
status | int | Returns a negative error code if an error occurs. |
Additional Information
Library: Programmer's Toolbox
Include file: toolbox\toolbox.h
LabWindows/CVI compatibility: LabWindows/CVI 6.0 and later