Jump to content

String control in radio button


Recommended Posts

I need an array of radio buttons, each which its own label next to it. Because of the array, I can't use the caption or boolean text properties.

So I put the radio button control in a cluster, along with some string controls next to the buttons. However, the string controls now show shadows underneath them, see the picture. I guess this is because the radio buttons are by themselves a cluster and the string controls are not really a part of this cluster, but on top of it.

I tried to get rid of the shadows by using a classic string control and making everthing transparent (left button), but it didn' t help either. :angry:

Any ideas how the get rid of the shadows?

Thanks

Guenther

post-3733-1142936222.jpg?width=400

Link to comment

If you can get away with having a fixed number of radio buttons in your block of radio buttons, then try the following:

Drop a Radio Buttons control on the front panel (that's 'Buttons' plural). Add more radio buttons to the cluster until you have the number you want, and arrange them as you want. Change each button's label to the values you want in your enumerated data type. Then for each radio button, make the label invisible but keep the 'boolean text' visible.

One radio button at a time, right-click on the radio button and select Create Property Node. You get a property node for that single button on your diagram, rather than a property node for the whole cluster. On the property node, change it to the property Boolean Text.Text. Now by wiring to this node, you can programmatically change the words next to the radio buttons.

If the number of radio buttons in the block is not fixed in your application, note that the Visible and Disabled properties of each individual button are also available programmatically, so you can effectively change the number of buttons in the block.

Link to comment
  • 4 years later...

I am trying to implement a GUI (LabView 8.0) to do a mutually exclusive selection from 8 preset radio frequencies. So obviously I thought of using “radio” buttons:rolleyes:.

However, I would like to load the button labels (frequency values) from an external file, when the vi starts up. Then the button block must output the selected frequency value to the associated control functionality.

I know how to read a file and extract individual initialization parameters from it. So initializing each button from a numeric, and outputting the selected value is all I need.

Can this be done with the radio buttons approach discussed above? Any chance of a sample/example vi?

Thanks in advance!

Link to comment
[...]

I know how to read a file and extract individual initialization parameters from it. So initializing each button from a numeric, and outputting the selected value is all I need.

You won't be able to change the control labels at run-time, so you'll have to make the captions visible and act on them.

post-7534-061126600 1288776868_thumb.png

Link to comment

You won't be able to change the control labels at run-time, so you'll have to make the captions visible and act on them.

post-7534-061126600 1288776868_thumb.png

Swell, sounds & looks doable!

Any chance you could post that vi in LabView 8.0 format? The LV 8.2 icons don't look like the 8.0 ones...

Thanks in advance!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.