LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reorder tabs in "tab control"

To all those willing to help:

I am using LabVIEW 8.6.  I have created several applications using "Tab Controls" to reduce the size of the UI.  This last one has been problematic in that the first tab does not display when the application is launched.  I have reviewed all project files and configuration settings without luck.  I have also searched through the help files and the NI web site without success.  So I am posting my question here...

 

How does one change the tabbing order for the tabs of a "tab control"?  Any and all help would be appreciated.  My thanks ahead of time. 

 

Bill Buxton

Bill Buxton
0 Kudos
Message 1 of 9
(4,726 Views)
Hi Bill.
I hope I understood right: You have some tab controls that come with several pages and you want to have a specific page to appear when the VI starts.
This can be achieved by creating a property node for the tab control. Select the property "Value". Change the property node to "write" if it isn't yet. Create a constant value for the property node and select the page you want to see at start-up.
Make sure that this code runs when the execution of the VI begins.
Hope this helps, Guenter
Message 2 of 9
(4,718 Views)

Bill,

Guenters solution will work if you can programatically determine your tab order.  If you would rather rearange your tabs though (see example)tabs.PNG

 

You can right click the tab controltab 2.PNG

 

and up pops tab 3.PNG

 

I haven't found a way to set this programatically-


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 9
(4,681 Views)
If you're just trying to set which tab is visible on launch, you can simply make that tab the default value of the tab control.  Select the appropriate tab, right-click the tab control border, and choose Data Operations > Make Current Value Default, and save the VI.
0 Kudos
Message 4 of 9
(4,670 Views)
It looks like there is an Invoke Node available through scripting that will rearrange the pages.  Put the VI can't be running when you do it.
0 Kudos
Message 5 of 9
(4,655 Views)

Another option is to use subpanels instead of a tab control.  Use buttons or a ring control to select the interface.  This is easy to dynamically change. However, it introduces a whole new level of complexity.

 

The problem with the tab control is that under the hood it is an enum.  The text and values of an enum cannot be changed at run time.  As Raven's Fan said, you can do it when the VI is not running.  However, you will need to call the VI dynamically to make this work, since it also cannot be idle in a running VI (reserved for running).

Message 6 of 9
(4,643 Views)
thanks for the explaination

DFGray wrote:

 

 

The problem with the tab control is that under the hood it is an enum.  The text and values of an enum cannot be changed at run time. 


Nice tidbit to know


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 9
(4,639 Views)

I appologize for my late reply.  I have been taking care of sick children and have just returned to work.

 

My thanks to everyone and their support.  After reviewing your suggestions I have decided to pursue the advise provided by Guenter Mueller.  I also reviewd Darren's, but decided to use a property node for greater flexibiity in the future.

 

Once again thank you all and I hope this thread will be of help to others in the future,

Bill

Bill Buxton
0 Kudos
Message 8 of 9
(4,622 Views)
Keep in mind that since you're just setting the value, a local variable of the tab control would work just as well as the Value property node.
0 Kudos
Message 9 of 9
(4,619 Views)