LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open a tab when a button is pressed

Solved!
Go to solution

Hi all,

I'm having trouble getting my VI to open a specific tab page when I press a button.

 

I found the following tip in the forum:

 

Use property nodes.  First, get the Pages references.  From that array select the specific page reference.  Then write Page Enabled to the Page Enabled property. After that write the value of the page to a local variable (if the tab is a control) or write the value directly to the terminal if the tab is an indicator.  Close references. 

 

What I've managed to do so far is set the Page Enabled property. However I can't seem to find any way of "writing the value of a page"

Could you help me with that?

 

Thanks

Nick

0 Kudos
Message 1 of 7
(3,690 Views)
Solution
Accepted by topic author NewbieNick

While refences will give you lots of toys to play with, it seems to me that they are just complicating matters here.... 

 

Take a look at this snippet: 

 

 snippet_tabs.png

Message 2 of 7
(3,683 Views)

Hi Nick,

 

I think you may be over complicating this problem a little, I always just use a series of case statements like in the attached image.

 

The tab control is called View and the page names are "Overview", "Meier 2" etc.

 

When you click the button on the front screen the view is changed to which ever view you have in the case statement. Make sure the button is set to "Latch when pressed"

 

Maybe there is a more sophisticated way of doing this, but this way works ok for me. 

 

Hope that helps,

 

Easy,

 

Darren.

0 Kudos
Message 3 of 7
(3,681 Views)
Jan_Heg has the right Idea, but I have aquired this from the forum a while ago so I will upload it...
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 4 of 7
(3,661 Views)

Thanks Jan_Heg

I never supposed it was that simple

 

Much obliged

Nick

0 Kudos
Message 5 of 7
(3,654 Views)

That seems massivley over complicated to me, also it is limited to viewing pages sequentially.

 

What if you have a main screen displaying overview data and you want to view something in more detail, you would have to cycle through all the windows before getting to the one you want.

 

Surely having individual buttons for individual pages is better...unless you want to view things sequentially...

 

Easy,

 

Darren

0 Kudos
Message 6 of 7
(3,653 Views)

Wortel,

 

you can make individual buttons for the event structure as well...

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 7 of 7
(3,650 Views)