LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

run time change # of radio button and boolean text

does Labview 8 support run time programmically change number of radio button and boolean text for each radio button?

Thanks,
DG

0 Kudos
Message 1 of 18
(4,550 Views)

You cannot programmatically change the number of booleans inside a Radio Buttons Control.  You can, however, programmatically change their visibility and position, thereby allowing you to change the number of visible buttons at runtime. 

And since the buttons inside a Radio Buttons Control are standard booleans, there is no problem changing their Boolean Text property at runtime.

Hope this helps,
-D

0 Kudos
Message 2 of 18
(4,547 Views)
I was hoping I can read Boolean Text from a ini file to set the # of booleans and text, so that operator can just edit ini file to change the option. Looks like if they want to change the radio buttons option, I have to do it.
 
Thanks for you help.
0 Kudos
Message 3 of 18
(4,540 Views)

Any chance you could use a Ring as your UI element instead of radio buttons?  You can very easily change the number of items displayed in a Ring via a property node...seems like this would be your best solution if you want to give a dynamically-defined number of options to the user.

Just a thought,
-D

0 Kudos
Message 4 of 18
(4,534 Views)

The program is built for production. The operator will need to choose these options many many times. with radio buttons, they can see all the option at once. with a Ring, they have to click, find then release. considering they are going to do this all day long, a little is a lot. and hopefully, they wouldn't change the option a lot once the dust settled.

 

thanks anyway.

0 Kudos
Message 5 of 18
(4,532 Views)

Ok, if they have to see all the options at once, how about a listbox?  😉

-D

0 Kudos
Message 6 of 18
(4,531 Views)

You can also customize a slide control to look like radio buttons. You can control the text labels and the number of element through a property (by changing the scale properties). If you really want it to look like radio buttons, you can try ripping the images from the dialog radio button. Also, to save some time, you can get the OpenG buttons package, which includes a slide customized to look like radio buttons. The main problem with this is that changing the number of items does not change the size of the control and that makes the dot filling the radio buttons look compressed.

Another option is to create an array of radio buttons, but then you will have to handle the logic yourself.


___________________
Try to take over the world!
0 Kudos
Message 7 of 18
(4,522 Views)

Excellent suggestion! I tried listbox, works perfect for me.

thanks!

0 Kudos
Message 8 of 18
(4,511 Views)

I know, that's an old issue, but I'm sure I'm not the only one who wants to configure the radio button text during run time.

 

The main issue is, that the Controls[] property of the radio button structure returns generic control references and not them for booleans. In this case type casting the reference to a boolean control reference helps.

 

Once, youv'e got a boolean reference it is easy to set the BoolText.Text property.

 

0 Kudos
Message 9 of 18
(3,568 Views)

How do you change the boolean text for a boolean in a radio button at run time? I have been doing this with property nodes but I can't access the option to do this for the boolean controls within the radio button

0 Kudos
Message 10 of 18
(3,062 Views)