CopyTabPage
int CopyTabPage (int sourcePanelHandle, int sourceControlID, int sourceIndex, int destinationPanelHandle, int destinationControlID, int destinationIndex);
Purpose
Copies a tab page to another position in the same tab control or to a different tab control.
The indices of the existing tab pages in the destination tab control at and beyond the insertion point increase by one.
The function returns the index of the new tab page or an error.
Supported Controls
You can use CopyTabPage with tab controls.
Parameters
Input | ||
Name | Type | Description |
sourcePanelHandle | int | Handle of the source panel containing the tab page to copy. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel. |
sourceControlID | int |
The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl. This ID refers to the tab control that contains the tab page to copy. |
sourceIndex | int | Zero-based index of the source tab page to copy into the destination tab control. |
destinationPanelHandle | int | The panel that contains the tab control into which you want to copy the tab page. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel. |
destinationControlID | int |
The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl. This ID refers to the tab control into which the tab page will be copied. |
destinationIndex | int | The zero based index into the list where CopyTabPage places the new tab page. Pass –1 to insert the new tab page at the end of the list in the destination tab control. |
Return Value
Name | Type | Description |
newTabIndex | int | Returns the index of the new tab page in the destination tab control. Use this index to specify the tab page in subsequent function calls. Negative values indicate that an error occurred. |
Additional Information
Library: User Interface Library
Include file: userint.h
LabWindows/CVI compatibility: LabWindows/CVI 8.0 and later
Example
Refer to udp\UDPChat.cws for an example of using the CopyTabPage function.