[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TCustomTabControl.RemovePage

Removes the page object at the specified position in the page list and updates the visible tabs on the control.

## Declaration

Source position: comctrls.pp line 465

`protected procedure TCustomTabControl.RemovePage(`
`Index: Integer`
`); virtual;`

## Arguments

`Index` |  | Ordinal position for the page object removed from the page list.

## Description

RemovePage is a method used to remove the page object at the position specified in Index from the page list in the tabbed control.

RemovePage gets the TCustomPage instance at the specified position in Page and performs actions needed to remove the page object. The TabVisible property in the page is set to False, and the page is removed from both the local page list and the page list in the widget. PageIndex is decremented when it contains the page Index removed in the method.

No actions are performed in the method if Index is not in the range 0..PageCount-1.

## See also

TCustomTabControl.Page |  | Provides indexed access to the page objects used on the tabbed control.
TCustomTabControl.PageCount |  | Returns the number of page objects stored in the internal page list for the tabbed control.
TCustomTabControl.PageIndex |  | Ordinal position for the selected page on the tabbed control.
TNBPages.DeletePage |  | Deletes the page stored at the specified position in the page list.
TCustomPage.TabVisible |  | Indicates if the tab in the Parent control is visible.