LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resize Radio Buttons?

Solved!
Go to solution

Is it possible to resize Radio Buttons? I have been poking around with one and believe that it is impossible. 

 

I would like to use a row of Radio Buttons to select what screen to display on a touch screen monitor.

 

What is the easiest way to make a row (Array?)  of Boolean Controls act like a Radio Button control? 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 31
(4,611 Views)
Solution
Accepted by topic author RTSLVU

So where's your code?Smiley Wink

 

I've been known to create a Cluster of Boolean LEDs (a Cluster, since that allows me to space them as I wish them to look, an LED, as it can be a Control, but can also be programmatically "set", and as a Cluster element, I can also name each of them) for just this purpose ...  Don't have one handy at the moment, but I think you get the idea.

 

One of my fancier ones (serving as a "Select Me if Pushed" and "Show Status") used a 6 x 4 Array of these things, each one with a Boolean Reference gathered into an Array of References.  The "simple thing" I could do was turn programmatically turn it On or Off (set Value to T or F).  I could also "fake a button press" (use Value-signalling).  For Status, I changed the Color mapping -- Green (Bright and Dull) was OK, Yellow was Caution, Red was Failing, and Black was "off line" (it didn't have a different "Off" color -- Dead = Dead).

 

Bob Schor

Message 2 of 31
(4,609 Views)

@Bob_Schor wrote:

So where's your code?Smiley Wink

 


Oh yeah, here you go 😛

 

RadioButtons.png

 

The cluster sounds like a good idea, thanks.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 31
(4,605 Views)

Hey I finally found a use for the Event Structure! 

 radioButtons2.png

My first time ever... So be kind 😛

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 31
(4,587 Views)

Not related to your code, but original question. Check out DMC

 => (It's Free)

You can get Radio buttons that look like this, and are resizable, it's a good target for a touch screen. I have added individual decals in the past to the buttons.

 

mcduff

Snap6.png

 

 

 EDIT:

Here's a customized version of the control.

Snap7.png

 

 

 

0 Kudos
Message 5 of 31
(4,570 Views)

I guess I don't understand the question. A radiobutton control is just a special container for booleans (any type, flavor, amount) with some logic that only the last pressed is true.

The type is an enum containing the labels of the Boolean as item names. The value is the current selection.

 

Like clusters, you can arrange the elements any way you want (turn off autosizing, arrange horizontally, etc.)

 

Yes, before radiobuttons, we had to make our own logic. (Still true for special versions. I have one where the last two are true ;))

 

(Posting by phone, cannot test you snippet)

 

(And please vote for this old idea :))

Message 6 of 31
(4,561 Views)

Alternately, you could use a tab control with the actual bit of the tab you'd normally put things in resized to zero height.  It would eliminate the need to have actual code running that turns off any other Boolean that's part of the cluster that's already on.  Not perfect, but it might be simpler.

0 Kudos
Message 7 of 31
(4,558 Views)

Since CA can't post code, I'll take advantage of his do more with less motto. Smiley Wink

 

If you put all of your booleans in a cluster, then you can do the following:

Snap8.png

 

 

 

 

mcduff

Message 8 of 31
(4,554 Views)

@mcduff wrote:

Since CA can't post code, I'll take advantage of his do more with less motto. Smiley Wink


Similar to my ancient code, but "not equal" would do the same as XOR, but be less cryptic. Also try to add logic for "allow no selection", ie pressing the active element would turn all off.

 

Also, that was before the event structure...

0 Kudos
Message 9 of 31
(4,551 Views)

I seriously did not see your ancient code, but am not surprised that you already solved the question before it was asked. Smiley Very Happy

 

You are correct that it is missing logic, like no selection, etc.

 

Cheers,

mcduff

0 Kudos
Message 10 of 31
(4,545 Views)