LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

uncheck radio button

Hi

    i have a radio button with two input. at any time any one of the button is checked(selected).what i want is when i run the program, no button should be selected. how can do this programatically.it should look like below:untitled.JPG

Regards
RobinHood
0 Kudos
Message 1 of 21
(6,322 Views)

Right click the border of the radio control. And select 'Allow No Selection', this extends the enum value of the control with a 'Allow No Selection' option and could break you allready existing code, be aware of this. To set the 'empty' value have a look at this code:

 

Ton

 

PS please post smaller picture.

 

Message Edited by TCPlomp on 11-02-2010 08:51 AM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 21
(6,309 Views)
One suggestion is to use another button and use it as default.
0 Kudos
Message 3 of 21
(6,307 Views)

There are two possible solutions:

 

1. Replace Radio buttons with booleans - so you will have two controls and both can be unchecked (some logic required for switch between both) 

 

2. Add third Radio button - when user will select this, then both radio buttons above will be deselected automatically (IMHO from user interface point of view this solution preferred) 

 

Andrey. 

0 Kudos
Message 4 of 21
(6,304 Views)
2.PNG
0 Kudos
Message 5 of 21
(6,303 Views)

This has worked.but what i need is in the first frame the radio button is unchecked and in the next frame the user should be able to select the radio button.But in he solution provided by you, I'm not able to select the button once it is unchecked in the first frame.

2.JPG

Regards
RobinHood
0 Kudos
Message 6 of 21
(6,284 Views)

TCPlomp wrote:

Right click the border of the radio control. And select 'Allow No Selection', this extends the enum value of the control with a 'Allow No Selection' option and could break you already existing code, be aware of this. To set the 'empty' value have a look at this code:

 


Ah, thanks for point to this, I just forgot, that "No Selection" is allowed for Radio Buttons.

 

But I think, that end User will be frustrated a little bit with such logic. The main principle of Radio Buttons is that the only one can be selected. So, the user expectation is: if Radio Selection 1 will be selected, then Radio Selection 2 will be unselected automatically. Now Radio Selection 2 selected back and Radio Selection 1 unchecked. In case if "Allow No Selection" option will be enabled, then at the first, user will think "How can I do this?!" By click somewhere outside of control? No, he should click on selected button once again, then this button will be unselected and no buttons will be selected as shown in screenshot above. If somewhere in the same application another Radio Buttons group present, then User will be frustrated again: Is "No Selection" allowed for this group, or not? Click again on selected button - and button remain selected. So, solution with three buttons is probably not very elegant, but more simply for understanding from user's point of view.

 

But in general it depends from the application - how it used in context and which options behind of Radio Buttons.

 

Also refer to Radio Buttons Guidelines

 

Andrey.

 

0 Kudos
Message 7 of 21
(6,283 Views)

Robin Hood wrote:

This has worked.but what i need is in the first frame the radio button is unchecked and in the next frame the user should be able to select the radio button.But in he solution provided by you, I'm not able to select the button once it is unchecked in the first frame.

 


It means something like that:

 

rb.png

 

Andrey.

 

0 Kudos
Message 8 of 21
(6,271 Views)

Hello Robin,

 

to understand the function of your code, you should run it with Code-Highlighting "On" (i.e. the little bulb should be yellow). Then you will see, with every loop the radio buttons are reset to "no selection. The correct codewould look like this (btw. the sequence is not necessary, it's just to show the little alteration I made to your code).

 

 

 

greets, Dave

 

P.S. a little bit slower than Andrej Smiley Happy

Message Edited by daveTW on 02-11-2010 10:51 AM
Greets, Dave
Message 9 of 21
(6,268 Views)

daveTW wrote:

 

P.S. a little bit slower than Andrej Smiley Happy


I'll give to you Kudo as comensation 😉 (and especially for explanation)

 

Andrey.

0 Kudos
Message 10 of 21
(6,263 Views)