LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Example for GetSelectedRadioButtons

Hi is there an Example for GetSlectedRadioButtons.
 
Thanks
 
-Charles
0 Kudos
Message 1 of 3
(3,277 Views)

Hi Charles,

I do not believe that there is a shipping example within CVI that explains how to use the GetSelectedRadioButtons function, but I would be glad to help you with this. It sounds like you are trying to use a group of radio buttons within your application, where only one button can be selected at a time. To do this, I would recommend using the Radio Group Control located under Customer Controls >> Toolslib Controls >> Radio Group.

After you have placed a Radio Group control on the user interface, you can programatically access which button is selected using the Radio_GetMarkedOption function that is part of the RadioGroup isntrument file. The selection can be represented in a variety of data types; for example, you can retrieve the selected button's index in integer format. The GetSelectedRadioButtons function that you were initially asking about deals with individual radio buttons (that aren't grouped), and using this method would require more code to ensure that only one radio button is selected at a time.

Please let me know if you need any additional information, and have a great day Charles!

Regards,

Casey Weltzin
Applications Engineer
National Instruments

0 Kudos
Message 2 of 3
(3,250 Views)

Thanks Casey.

 

-Charles

0 Kudos
Message 3 of 3
(3,248 Views)