LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add pages to a tab control programmatically?

I would like to know if there is any way to add pages to a tab control programatically.
0 Kudos
Message 1 of 6
(3,473 Views)

Tabs are like to enums so I dont think you can update them at runtime.  You can however make extra taba and hide/show them at runtime.  What are you trying to do, maybe there is a work around (subpanels, dynamic vis ...)

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 6
(3,469 Views)
Hi,
I do not think you can add/delete pages to a tab control at run time. These are only edit time features.
A work around would be to create all the pages you need, hide the pages, and then make the pages visible at run-time as needed.
What are the requirements of your application?
0 Kudos
Message 3 of 6
(3,466 Views)
I have to show some information from n sensors. The number of sensors will be determined at run time and for each sensor there will be a page from a tab which shows some indicators and graphs. I think I wold have to create extra pages and make them become visible at run time according to my needs, as you suggest. Thank you for the answers.
0 Kudos
Message 4 of 6
(3,458 Views)

There are some work arounds one is to think of ways to reuse a finite set of controls instead of tabs (reconfigure the look depending on the selected sensor).  Are all the sensors the same?  Is there a maximum number of sensors? 

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 6
(3,412 Views)
Also, if you're using a tab control, you can only view one sensor at a time, so why not use a subpanel, have all your sensor display VIs running dynamically, and insert the proper VI upon user selection?
 
edit - also, if you have an unknown N number of sensors that are putting out similar data, you can make the display VI into a .vit and call instances programmatically.


Message Edited by JeffOverton on 05-02-2008 10:25 AM
0 Kudos
Message 6 of 6
(3,398 Views)