LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Well, you can change the names of the tabs.  If you deselect (or programatically set) the option Make Page Caption Match Label under the Advanced settings for the tab control, you can programatically change the caption.  The value on the block diagram stays the same, but visually, you can make the tab appear to have a new name.
Message 11 of 16
(1,486 Views)
Thanks for the pointing that out. I was obviously referring to the names (labels), not the captions, which can, of course, be changed programmatically.
0 Kudos
Message 12 of 16
(1,480 Views)

Phew! Thanks for letting me know that. I actually started to freak Smiley Mad out on manipulating Tab control!

 

 

Thanks Matthew Kelton! You brought the Tab Panel back in action Smiley Happy

 

 

But still if I go with smercurio_fc and suggestion of others w.r.t. a non tab control based solution for a dynamic GUI creation, is there any control which has the benefit of Space saving GUI similar to Tab control but is feasible to manipulate using the suggestions mentioned?

 

 

Meanwhile with renewed motivation to work this Tab Panel thing, if am able to make it possible, shall post the VI so that everybody can benefit from it!

 

I have attached a snapshot of what am trying to achieve so that my point gets put forth in right way.

 

 

Thanks and Regards,

Tirthankar De

 

0 Kudos
Message 13 of 16
(1,467 Views)

What might end up being a lot easier for you is to use a tree control.  The whole tree can be dynamically built.  You didn't say whether the spreadsheet will change the number of controls you would need on the screen, but you have a couple of options that way.

 

1.  Assuming you have static code to represent the different configurations, just use the tree (or listbox) with a subpanel which you can load the proper VI for configuration.

 

2.  Assuming you want to support dynamic spreadsheet changes, you can use a table/multicolumn listbox or the extra columns of the tree to display a table of the settings.  You can have a hidden ring control which you can position as needed.  When the user clicks or double-clicks on a value, a boolean can either switch values, or use the ring control to indicate True/False, OFF/ON, etc.  The ring can be populated with the values.  There are some forum threads pertaining to having a ring control pop-up for a table or listbox.

Message Edited by Matthew Kelton on 12-19-2008 03:54 PM
0 Kudos
Message 14 of 16
(1,462 Views)

Following Matthews advise on the Tree control.

 

Have look at the LabVIEW options dialog. This is basically a framework with two panes:

On the left a tree control (or listbox I'm not 100% sure), and on the right a sub-panel.

Selecting an item in the list displays a different VI in the sub-panel.

 

The framework is stored under LabVIEW x.x\resource\Dialog\PreferencesDialog.

 

I have never actually used the framework to build my own but it could be doable.

Even the options dialog for a control is based on a (tab-based) framework.

I didn't study it but the folder LabVIEW x.x\resources\PropertyPages has a lot of information on the dialog.

It looks like a tab-control with only the tab-header and a sub-panel beneath it.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 15 of 16
(1,455 Views)
I actually use the tree with tabs to do the configuration similar to what Ton describes.  I hide the tabs and change the tab value when the user changes the tree (or listbox control) selection.  As Ton said, it looks very similar to what NI does with the LabVIEW configuration screen and what many/most Windows apps have moved towards.
0 Kudos
Message 16 of 16
(1,452 Views)