LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programatically increase number of pages of a tab control ?

Dear All,

 

 

Am trying to make a generic configurable GUI where the configuration data is in a CSV (or any) file and the LabVIEW shall read the contents and accordingly generate a GUI. In current scenario, the CSV may have data for a single or multiple pages, so programatically how do I add or delete pages of a Tab control.

 

 

Link to other forum# http://forums.lavag.org/How-to-programatically-increase-number-of-pages-of-a-tab-control-t12701.html 

 

 

 

Thanks and Regards,

Tirthankar De

Message Edited by Imagineer on 12-18-2008 10:24 AM
0 Kudos
Message 1 of 16
(5,066 Views)
Did you try a search? This question has been asked many times before. You cannot add pages at run-time. You can hide/show ones you don't use.
0 Kudos
Message 2 of 16
(5,062 Views)
Yep I tried searching with above question, but did not get any results, not even close - Thats why posted this question.
0 Kudos
Message 3 of 16
(5,059 Views)
Well, it appears you have your answer then. Smiley Wink
0 Kudos
Message 4 of 16
(5,027 Views)
Yep I got the search criteria.....and looking through it Smiley Indifferent
0 Kudos
Message 5 of 16
(5,024 Views)

Imagineer,

 

Even if I posted a VI that would add another tab page to a tab control, you would still need to put controls and indicator on the page.

 

If a "completely unspecified GUI appearence" is a requirement for your project then you should look into using the Picture Control. Although it may look a little complicated, it is a lot easier than LabVIEW Scripting* plus it is actually supprted.

Ben

 

*LabVIEW Scripting requires a specail license from NI but allows the programatic manipulation of VIs using VIs. Let me try to put it another way. I have delivered multiple applications that make use of the Picture Control to realize GUI that can not be layed-out at development time. I don't have the guts to even dare trying to deliver one that uses scripting.

Message Edited by Ben on 12-18-2008 12:49 PM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 16
(5,018 Views)
Another possibility is to use a sub-panel. The sub-panel would, in essence, display a VI whose front panel was the contents of the tab page. You could use a dropdown or some other control to select what's displayed. Don't know if this will work for your architecture, though.
Message 7 of 16
(4,982 Views)

I have done what you are trying to do using subpanels. Through a combination of subpanels and VI server you can define an application framework that is reconfigurable at runtime by installing different plugins into the subpanel.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 8 of 16
(4,980 Views)

Dear All,

 

Thanks for the valuable inputs, but still unable to achieve my goal - Create a Tab panel on the fly and as well add/delete/rename pages on the runtime.

 

1] I tried using the Picture Tool but unable to figure out a way to add and rename pages to a tab control ?

 

2] Using subpanels, is it possible to add/delete pages and as well  rename the page, and also placing controls inside the tab pages ?

 

One approach: I can create multiple tab pages and make them invisible with each page having a blank picture to add controls dynamically. In the run-time depending on condition make required number of pages visible, but still am unable to edit the page name ?

 

Any help ?

 

 

Thanks and Regards,

Tirthankar De

0 Kudos
Message 9 of 16
(4,953 Views)
You are having difficulty because you are still trying to use a tab control. Smiley Wink All of the suggestions given are based on not using a tab control at all. You cannot rename the tab pages at run-time. The tab control datatype is an enum, which cannot be edited at run-time.
Message 10 of 16
(4,948 Views)