LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use one button on two different tabs?

I'm using a tab control, and I have two tabs that I would like to have the same button on. I saw you can move the button on top of the tab control, but that makes the button visible on every tab. Is there a way to make it visible on only selected tabs, or is there a way to make two buttons and have them linked to the same event? It seems like a waste to have to copy everything for that case, and have to make a new event for the extra button. 

0 Kudos
Message 1 of 4
(4,025 Views)

The simplest thing is to create two buttons. If you manage button clicks in an Event Structure (recommended), just define a single case for both Button1_ValueChange and Button2_ValueChange. If you poll the button values, wire the OR of the two values to a Case Structure.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 2 of 4
(4,010 Views)

Yes, you can add several events to one event case of the event-structure. Just click "Add event" during the editing of an event case and then select another event source.

 

Another idea would be to monitor, which tab page is active and to show your button just on those pages that you would like your button to appear and hide it on the other ones. Use the property node "visible" for that.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 3 of 4
(4,009 Views)

Hi guy,

 

Is there a way to make it visible on only selected tabs,

Yes.

 You can use property nodes of the button to make it (in)visible depending on the selected tab.

 

or is there a way to make two buttons and have them linked to the same event?

Yes.

You can assign several controls to just one event case.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(4,007 Views)