LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how do you copy a tab including its UI components?

Hi,
I'm trying to create a complex gui that I would like to constuct 'on the fly' after reading the contents of a .ini file.  For example, if the .ini says that I have 5 widgets, I would like to create 5 tabs.  However, each of these tabs has a multitude of UI components: Graphs, Text boxes, Labels, etc embedded on them.  When I do a 'copytab', it copies only the tab, leaving out the UI components contained in the tab.  Is there a way to easily copy everything that the tab contains, or do I have to copy each and every UI component on the tab?
Thanks,
Owais

0 Kudos
Message 1 of 3
(3,402 Views)

Hello Owais,

are you using the new tab control of CVI8? If so, the CopyTabPage function does what you are describing. The line of code below copies the first tab page of a tab control and adds it to the end of the tab control, causing the number of tab pages to increase by one.

CopyTabPage (pnlHandle, PNL_TABCTRL, 0, pnlHandle, TABCTRL, -1);

Message 2 of 3
(3,385 Views)
Thanks Very much.
This is exactly what I wanted.
Owais
0 Kudos
Message 3 of 3
(3,349 Views)