LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

One button ON other automatically OFF

Dear all

 

 

I am trying to make a program to registery a code when I press a button from desktop

 

The problem is that when I choose level 1 button than when I need to change level 2 I need first deselect level 1 than select level2.

 

Is there a way to select level 2 and level1 deselect automatically?

 

I need in each line 1 button ON so if i press some other button in same line, the last one ON must utrn OFF automatically.

 

Best regards

CPalha

0 Kudos
Message 1 of 6
(3,540 Views)

Radio buttons.

 

Another option would be to handle the value change of a button in an event structure, and change the value of the other buttons back to false programmatically. within the event case.

0 Kudos
Message 2 of 6
(3,516 Views)

Hi Ravensfan

 

 

Thanks for your help, there should be a radio buttons.

About other option, can you please do a smal example 2 or 3 buttons?

 

 

Thanks in advance.

cpalha

0 Kudos
Message 3 of 6
(3,498 Views)

It is not clear from your image which buttons are mutually exclusive (naming them all "cancel button xxx" does not really help to improve clarity).

 

Do you want each row or each column to be mutually exclusive or do you want only one of the 16 buttons on at any given time?

 

A radiobutton control is just a specialized container, similar to a cluster. You can drop or remove as many boolean buttons of any shape (except it unfortunately cannot be empty, that's why we have this idea) and the code will do the rest. You should be able to figure it out easily. In your case, you would drag the desired buttons from your front panel into the rabiobutton control, then delete the booleans that were already in there. The value of the radiobutton control is similar to an enum, with the item name corresponding to the button labels.

0 Kudos
Message 4 of 6
(3,475 Views)

Hi Altenbach

 

Thanks for your explanation.

I will try to do what you said.

 

Best regards

cpalha

0 Kudos
Message 5 of 6
(3,461 Views)

@cpalha wrote:

...About other option, can you please do a smal example 2 or 3 buttons?

 

 

Thanks in advance.

cpalha


set the controls, "switch when pressed"....

Example_VI.png

0 Kudos
Message 6 of 6
(3,456 Views)