LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable a tab

Solved!
Go to solution

Dear Experts,

 

I am attaching the following vi. I want to disable 'page 1' tab when Ok button is pressed. I kindly request you to help me in implementing the same. Thank you.

Download All
0 Kudos
Message 1 of 11
(2,782 Views)
Solution
Accepted by topic author salauddin

Use "Pages" property node which will return an array of page references, index the page you want to change and use "Page Enabled State" property node.

set tab page enable.png

Lucian
CLA
0 Kudos
Message 2 of 11
(2,764 Views)

I developed something like this. But, still not getting the desired functionality. Kindly help.

0 Kudos
Message 3 of 11
(2,736 Views)

Hi salauddin,

 

why do you need to read the "pages" property so often (in each iteration)? References do not change at runtime…

Why are there so many hidden wires? How should we analyze your block diagram? (Why don't you attach your VI???)

 


@salauddin wrote:
I want to disable 'page 1' tab when Ok button is pressed.

still not getting the desired functionality.


What is the "expected behaviour"?

There is no "OK button" in your image…

Best regards,
GerdW


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

Thank you. I fixed it by the following code

salauddin_0-1574671673253.png

0 Kudos
Message 5 of 11
(2,725 Views)

Dear Experts,

 

I request you to help  me make the first page invisible after clicking the OK button in the first page. Thank you in advance. Herewith, I attach the screenshot and VI here.

salauddin_0-1574688038001.png

0 Kudos
Message 6 of 11
(2,699 Views)

Hi salauddin,

 

to show/hide pages in a tab control you should use the "Visible" property of the pages…

 

Btw. this will provide a very bad UX!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 11
(2,690 Views)

When you change the active tab, the other tabs are automatically hidden. There is no need to explicitly hide the tab.  Just move the tab selector off-screen so they can't be seen and use menus, buttons or user events to switch tabs programmatically. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 8 of 11
(2,647 Views)
Solution
Accepted by topic author salauddin

@aputman wrote:

... Just move the tab selector off-screen so they can't be seen and use menus, buttons or user events to switch tabs programmatically. 


I would not physically "move" the tab selector off the screen. This is confusing to the developer and the control can actually still be "tabbed" to (using the Tab key; unless that is disabled in the properties). Also if the front panel ever becomes misaligned during development, it's a pain to move it back to 0,0.

 

Just hide the tabs by deselecting the Tabs item in the Visible Items list (there's also a property node for this). You'll also need to disable tabbing to the control unless you want someone to change the page with the arrow keys (people still use keyboards, you know).

 

But to aputman's point, just check out this post (from 18 years ago!) about making a wizard-style interface in LabVIEW with tab controls.

_______________________________________________________________
"Computers are useless. They can only give you answers." - Pablo Picasso
0 Kudos
Message 9 of 11
(2,626 Views)

Thank you. I was able to finish it using tab properties.

0 Kudos
Message 10 of 11
(2,609 Views)