10-16-2009 04:26 AM
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
Solved! Go to Solution.
10-16-2009 04:47 AM
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:
10-16-2009 04:49 AM
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.
10-16-2009 06:01 AM
10-16-2009 06:10 AM
Thanks Jan_Heg
I never supposed it was that simple
Much obliged
Nick
10-16-2009 06:11 AM
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
10-16-2009 06:19 AM
Wortel,
you can make individual buttons for the event structure as well...