LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling and disabling tabs (tab control) at runtime

I have an app that uses the tab control. I would like to disable certain tabs based on login/password. I don't seem to be able to find the right property to make this happen. Thanks for the help.

Todd
0 Kudos
Message 1 of 10
(6,017 Views)
Create a property node for the tab and select the Pages property. This is an array of references to the pages. Extract the reference for the page you want from the array and wire it into a property node and now you'll have a page enabled mode property which you can use.

___________________
Try to take over the world!
Message 2 of 10
(6,009 Views)
To disable certain pages of a tab control you must first get a properity node for the tab control and select the "pages" selection. The "pages" will return an array of page references. Use the index array to select the page to disabel (first page is zero indexed). Send the indexed page reference to another properity node and select page enable, where you can enable, disable or gray/disable. A niger option might be so select page visable and hide selected pages when not inuse. I have not played arround too much with these options but had gotten them to work as described above with little problems. Remember that when setting pages to be invisible or diabled programatically I think you must also undo them programatically. This can be a pain when developing/debugging an application so I would make a vi to return the controls to a default state (ie visable and enabled). Good luck
-Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 3 of 10
(6,003 Views)
You need the Pages property for the tab control. This output will be an array of all the tabs in your control. You then need to use the array index function to grab the tabs you need based upon your login criteria. Once you have the tab index reference you want to control, you then need the Page Visible property. From here you can write either a true or false boolean to it.
Message 4 of 10
(6,002 Views)

Hi,

I am trying to do the exact same thing. After i obtain the index from the pages property node, how to I control the tab I want enabled or disabled? 

The other property nodes I can find are disabled, visible, page selector vicible and tab visible? 

But all these property nodes are outputs. When i try creating a  constant or an input it does not allow. How do i create a control for these property nodes?

Thank You

0 Kudos
Message 5 of 10
(5,257 Views)

Did you do the simple thing of right clicking on the property and selecting Change to Write?

0 Kudos
Message 6 of 10
(5,252 Views)

Thank You.

I will now proceed to sharply impact my head onto a hard surface repeatedly. 

😛

Message 7 of 10
(5,246 Views)

After obtaining the page refnum from the Index array. Which property node should I pass it to? 

The Visible and Disable property nodes have only one boolean input. Which property node do I pass it on to before I can enable or disable the particular tab?

0 Kudos
Message 8 of 10
(5,243 Views)

I'm seeing the same properties as you: visible, disabled, page selector visible, and pages.  I don't see anything about a "page visible" property.  BTW, I'm using LV 7.1.  Also, the tab control property node only has an error in input and error out output.  No connectors for a reference, even though the context help has references shown.

 

HOWEVER...if I simply copy and paste the tab control property node, I get a generic node that DOES have a reference input and when wired to output from the index array function, I CAN select the PageVis function and wire a boolean to it!  My test vi works exactly like I want and can make various tabs appear and disappear on command.

Download All
0 Kudos
Message 9 of 10
(4,920 Views)

I have two pages which I want to toggle based on a boolean on/off switch. I can toggle but during switch, one of the tab becomes persistently grayed ... Any idea how to make it a smooth operation.

RY
0 Kudos
Message 10 of 10
(4,815 Views)