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

# TNBPages.Clear

Removes all pages stored in the class instance.

## Declaration

Source position: comctrls.pp line 319

`public procedure TNBPages.Clear; override;`

## Description

Clear is an overridden method in TNBPages used to remove all of the TCustomPage instances in PageList. Pages are deleted (in reverse order) by calling the Delete method, but the active page is skipped to avoid activating other pages in the process. The active page is deleted last.

The inherited Clear method is not called in the implementation.

## Version info

Modified in LCL version 2.2.6 to avoid OnChanging and OnChange events when pages are deleted.

## See also

TNBPages.Delete |  | Deletes the page stored at the specified position in the page list.
TNBPages.NoteBook |  | Provides a reference to the control which owns the pages.
TNBPages.PageList |  | List with the TCustomPage instances for the class instance.
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.
TStrings.Clear