LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is TabControl can be used as an array?

Solved!
Go to solution

Hi All,

 

I would like to create a tabcontrol with cluster of controls on the page and each time that I add a new page the same cluster of control should appear. These clusters should be the elements of an array that permits me to manipulate easily.

Do someone know how to do it.

thanks by advance

 

regards

Philippe

0 Kudos
Message 1 of 7
(2,952 Views)

You will get the Duplicate Page method option if you have enabled the VI scripting, with this you can have whatever controls in one page gets duplicated. Then depending on the number of Tabs you can handle the cluster into an array.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 7
(2,935 Views)

Thanks but dynamically how can I do to create a new page with all the control ? I cannot see the Duplicate in the Invoke node

 

regards

0 Kudos
Message 3 of 7
(2,930 Views)

If you are using LV2011 you have the direct option to Enable the VI scripting Tools>>Option>>VI Server. Enable the VI scripting option and check.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 7
(2,911 Views)

Note that you cannot do this while your program is running.  If you want to dynamically create another page with the same set of controls at run-time, you are probably better off using the same controls over again, using some sort of listbox or combobox to select the set of interest.  Use an array on a shift register to cache the data for each instance of the controls.  When the selection changes, update the currently selected instance in the shift register, then populate the controls with the new values.  This ends up being a lot less code than the tab control, and scales a lot better than a tab control.

 

If you want to dynamically change what the controls are, use subpanels and host VIs in them.

 

Let us know if you need more info.

Message 5 of 7
(2,906 Views)

Hi DFGray,

 

could you givem an example to what you said : "Use an array on a shift register to cache the data for each instance of the controls.  When the selection changes, update the currently selected instance in the shift register, then populate the controls with the new values"

because I really do not know how to do it.

thanks by advance

0 Kudos
Message 6 of 7
(2,872 Views)
Solution
Accepted by mnemo15
0 Kudos
Message 7 of 7
(2,858 Views)