From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hello all

I have one doubt is it possible to use one control in multiple pages of tab control in front panel.

0 Kudos
Message 1 of 16
(928 Views)

Hi shwethact,

 


@shwethact22 wrote:

is it possible to use one control in multiple pages of tab control in front panel.


Short generic questions yield short generic answers: Yes, that's possible.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 16
(901 Views)

@GerdW: I'm pretty sure he meant "one and the same". If you also read it as that, then how it's possible? That'd be magic. 

0 Kudos
Message 3 of 16
(881 Views)

Hi MaSta,

 


@MaSta wrote:

@GerdW: I'm pretty sure he meant "one and the same". If you also read it as that, then how it's possible? That'd be magic. 


No one forces you to place that control inside a specific page of your tab, it can hover over the tab…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 16
(862 Views)

@GerdW  ha scritto:

Hi MaSta,

 


@MaSta wrote:

@GerdW: I'm pretty sure he meant "one and the same". If you also read it as that, then how it's possible? That'd be magic. 


No one forces you to place that control inside a specific page of your tab, it can hover over the tab…


To do this, you have to place the control outside the tab, then select it with a mouse click, eventually move it by means of the arrow keys over the tab until it reaches the desired position. If you don't want that the control be visible on all tabs, you will need to set the control's Visible property depending on the Tab control value.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 16
(849 Views)

I would place a shared control outside the tab structure. You can always disable it based on the tab value if it should not be used when certain pages are selected.

0 Kudos
Message 6 of 16
(813 Views)

@shwethact22 wrote:

I have one doubt is it possible to use one control in multiple pages of tab control in front panel.


Yes, and there are many ways to do it...

 

But without seeing your code to know exactly what you are trying to achieve we can only toss out suggestions that may or may not be applicable in your situation.

 

For instance you can make your tab control smaller and place that one control outside the Tabs so it is always visible.

 

You can have a control on each tab page that do the same thing (control_0, control_1,control_2) and simply label them the same on the front panel. Then using an Event Structure when control_1 value changes the new value is written to control_0 and control_2 using property nodes.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 16
(732 Views)

@altenbach wrote:

I would place a shared control outside the tab structure. You can always disable it based on the tab value if it should not be used when certain pages are selected.


I wouldn't use a Tab Container at all!  Yes, I still hate tabs!  My common approach to avoid the ungodly Tab container is to use a subpanel container instead and select the VI to load into that subpanel container with a custom Radio Button that looks and acts exactly like a tab page selection.

 

  <EDIT>: The radio button CAN act exactly like a Tab page selector.  But, you can also programmaticly access the enabled <enum> property for each Radio control button itself to hide some functionality based on user authority or prerequisites.  Tab page selection has no comparable feature for the  page selectors enabled state.  Plus, I could choose to undock or even launch the sub.vis as Floating or Modal panels.

</EDIT>

 

This puts the code to handle each page in its single responsible vi and permits main.vi to concentrate on simply displaying the chosen groups of user interactions without needing to handle the minutiae of what and how each group interacts with the user.  Reusable: Check,  Scaleable: Check, Organized, readable and Maintainable: ✔🛫

 

And, of course, you can even use a common control on any of the subpanel.vis that need access to that common data value or, exclude that control wherever it isn't useful. 

 

This approach easily address the original poster's problem without clumsy control visibility property management code or sloppy overlapping objects on the front panel of Main.vi 

 

 I hate tabs 


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 16
(719 Views)

I have both in my current project, tabs and sub panels. Loading sub panels is a pita. Debugging is even worse (works only if you don't load the VI into the sub panel for debugging, else you cannot access the block diagram anymore).

Tabs, well, the handling is kinda easy. By the way: you can place sub panels in tabs. 😉 

 

What's the benefit in sort of recreating your own tab, except from the fact that a sub panel control is a universal placeholder? 

0 Kudos
Message 9 of 16
(696 Views)

@MaSta wrote:

[...] Debugging is even worse (works only if you don't load the VI into the sub panel for debugging, else you cannot access the block diagram anymore). [...]


There is a "Allow User to Open Diagram" option in the right-click- menu for a subpanel in edit mode. If a VI is running in the subpanel you can right-click the subpanel and chose "Open Block Diagram".

 

 

Message 10 of 16
(689 Views)