10-22-2012 04:12 AM
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
Solved! Go to Solution.
10-22-2012 06:49 AM
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.
10-22-2012 07:22 AM
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
10-22-2012 09:04 AM
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.
10-22-2012 09:16 AM
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.
10-23-2012 08:18 AM
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
10-23-2012 10:15 AM
Here you go.