LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create same button on two page in a tab control?

Hello !

Now we are here again 🙂 We have a tabcontrol and want to be able to press the same button (a button that stops the program) on both pages of the tabcontrol. How can we do this?

Best regards!
0 Kudos
Message 1 of 10
(4,166 Views)
The simplest way is to place the button outside of the tab. This way it can be seen no matter which page is selected. If you still want it to be on the tab visually, place it outside the tab and then use the arrow keys to move it to where you want it. This way it won't be inside the tab but hovering over it. If you only want the button to be in certain pages, you can either use the click on one of the buttons to simulate a click on the real stop button or, better yet, use an event structure to capture both events and to trigger the stop sequence.

___________________
Try to take over the world!
Message 2 of 10
(4,161 Views)
Hello!

When one place the button outside the tab and then drag it where we want it, there becomes a weak shadow behind the button. Are we doing wrong or do we have to live with that shadow? Best regards.
0 Kudos
Message 3 of 10
(4,156 Views)
The shadow is a warning sign - it's there to show you that you placed the button over the tab and not in it. When you run the VI it should disappear. Also, you can use any of the other methods described here (I would prefer simply having the button outside the tab).

___________________
Try to take over the world!
0 Kudos
Message 4 of 10
(4,154 Views)
Hello!

Ok... we need to have the button on the tab control because there is no room left :-/. Strange that this function not is that well developed... thank you for your answer 🙂
0 Kudos
Message 5 of 10
(4,148 Views)
It's not the function isn't developed. It's just that every object on the front panel has a corresponding object on the block diagram. Attached is an example of how to do it with two buttons.
By the way, if you've run out of room on your panel, it probably means your interface is too crowded. If that is so, I suggest you add more pages to the tab to make your interface more clear.

___________________
Try to take over the world!
0 Kudos
Message 6 of 10
(4,144 Views)
To loose the dark outline (it annoys me as well):-

'Create' a decoration - frame/container, adjust size to slightly larger than the control/s, color to transparent(TT), 'Move to Back' of control/s, 'Group' control/s and container, select the new group and use move arrow to place the 'group' on Tab control.
0 Kudos
Message 7 of 10
(4,140 Views)
Hello again!

Can we get the stop-button on the first page too? We tried that but it did not work. Best regards.
0 Kudos
Message 8 of 10
(4,139 Views)
To get the stop button to work on the first page as well, you have to create another button, find the stop case in the event structure, right click on the event structure border and select "Edit events...". Then, you have to click the + on the top to add another event to the case, select the new button from the list on the left and select the proper event for it (value change, mouse down). Event driven programming can be very powerful. Try searching the site for "events" and "tutorial".
However, like I said, doing this will only make your code more complicated. It's preferable to have the button outside the tab.

___________________
Try to take over the world!
Message 9 of 10
(4,131 Views)
Hello!

Thank you for your kindness and help! We are greatful. We do come back as you know 😛
Best regards.
0 Kudos
Message 10 of 10
(4,124 Views)