# InsertTabPage

int InsertTabPage (int panelHandle, int controlID, int index, char itemLabel[]);

## Purpose

Inserts a tab page into the tab control.

Inserting the new tab page causes the indices of existing tab pages at and beyond the insertion point to increase by one.

The function returns the index of the new tab page or an error.

## Parameters

Input
Name | Type | Description
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID | integer | 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.
Index | integer | Zero-based index into the list where InsertTabPage places the new tab page. Pass –1 to insert the new tab page at the end of the list.
label | string | Label of the new tab page.

## Return Value

Name | Type | Description
newTabIndex | integer | Returns the index of the new tab page. Use this index to specify the tab page index in subsequent function calls. Negative values indicate that an error occurred.
Code | Error Message String
xx | Tab Index (Success)