LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use a control in different TAB Control

Solved!
Go to solution

Hello LabVIEW Enthusiast,

 

I'm using Tab control (multiple) and there are some controls over there. What I'm trying to do is:

 

The same control will be available in the different tab and if in one place control value changes another tab's control value will be updated with the same value. 

 

For easy demonstration I'm giving an example:

 

GUI.JPG

 

Here, Firstly Input 1 should be available in the page 2 tab, and then if I change the Input 1 value from page 2, page 1 Input 1 value will also change. So Input 1 control value should be the same on page 1 and page 2 tab.

 

Snipped also attached if you need to change in this example.

 

Appreciate your kind help.

 

- Reduanul

0 Kudos
Message 1 of 8
(1,691 Views)
Solution
Accepted by topic author REDUANUL

Hi Reduanul,

 


@REDUANUL wrote:
What I'm trying to do is:

The same control will be available in the different tab and if in one place control value changes another tab's control value will be updated with the same value. 


When the control should be visible on all tabs then you need to place that control over the tab container, but not inside the tab container!

 

  1. Move the control outside the tab using the mouse.
  2. Then select the control and move it using the arrow keys over the tab container! (Maybe change the z order using the foreground/background/grouping options in the menu to get to control in front of the tab container!
  3. Now you are done: the control will be visible on all tabs… (The border visible at edit time will vanish at runtime.)

@REDUANUL wrote:

Snipped also attached if you need to change in this example.


You didn't attach a snippet, but an ordinary image. This is quite a difference in LabVIEW! (Please read the LabVIEW help for snippets!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 8
(1,661 Views)

Thanks, GerdW it's working 🙂

 

Now is it possible to get rid of the black border color at edit time?

Then can I make control visibility on selective tabs instead of all? (e.g only on tabs 1 and 2 whereas I've 3 tabs and on tab 3 it will not be visible)

 

Like this:

 

pppppppppp.JPG

 

Last time as I said I uploaded a snippet that will work if you drag that image to the block diagram. I've checked it worked 🙂 

However, this one is the updated snippet for the above case.

 

nnn.png

- Reduanul

 

 

 

0 Kudos
Message 3 of 8
(1,635 Views)

Hi Reduanul,

 


@REDUANUL wrote:

Now is it possible to get rid of the black border color at edit time?

Then can I make control visibility on selective tabs instead of all? (e.g only on tabs 1 and 2 whereas I've 3 tabs and on tab 3 it will not be visible)


The black border will always be visible at edit time.

To control visibility programmatically you can use property nodes for that FP element…

 


@REDUANUL wrote:

Last time as I said I uploaded a snippet that will work if you drag that image to the block diagram. I've checked it worked 🙂 


I'm sorry, I didn't check the attachment. I just saw the image in the message text.

On your snippet: why is there no label at the tab terminal?

Best regards,
GerdW


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

Hello GerdW,

 


@GerdW wrote:


The black border will always be visible at edit time.


It will be also possible to remove the black border invisible at edit time (I tried and it works). For this you just need to put the control on a flat box like this:

 

ooooo.JPG

 

Thanks for your awesome help 🙂

 

 

0 Kudos
Message 5 of 8
(1,621 Views)

Hi Reduanul,

 


@REDUANUL wrote:

It will be also possible to remove the black border invisible at edit time (I tried and it works). For this you just need to put the control on a flat box like this:


What's the point to put more stuff on the frontpanel than needed?

Your users will never see the black border as they only see the frontpanel at runtime. That border is just a visual reminder to you (as the programmer) that this control hovers over the tab container…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(1,616 Views)

Hello GerdW,

 


@GerdW wrote:


What's the point to put more stuff on the frontpanel than needed?


Yes, that true but I did for looking visually clean.

 

Another thing I forgot to ask is there any way to do this? :

 

When I exit the program then Input Button 1 will be visible on Page 1 and on Page 2 it will remain as invisible?

I tried with the property node but did not work. In all tabs, it remains either visible or invisible.

 

- Reduanul

 

 

0 Kudos
Message 7 of 8
(1,609 Views)

Hi Reduanul,

 


@REDUANUL wrote:

Another thing I forgot to ask is there any way to do this? :

When I exit the program then Input Button 1 will be visible on Page 1 and on Page 2 it will remain as invisible?

I tried with the property node but did not work. In all tabs, it remains either visible or invisible.


When the VI has stopped then the code in the block diagram cannot react to user actions anymore: the last visibility setting will stay active until you run the VI again…

 

As I said before: your users will never see the frontpanel at edit time - so what's the problem?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 8
(1,576 Views)