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

# TPageControl.SelectNextPage

Locates and activates the next page in the specified direction.

## Declaration

Source position: comctrls.pp line 600

`public procedure TPageControl.SelectNextPage(`
`GoForward: Boolean`
`); procedure TPageControl.SelectNextPage(`
`GoForward: Boolean;`
`CheckTabVisible: Boolean`
`);`

## Arguments

`GoForward` |  | True to search for a subsequent tab sheet. False to search for a prior tab sheet.

## Arguments

`GoForward` |  | True to search for a subsequent tab sheet. False to search for a prior tab sheet.
`CheckTabVisible` |  | True if the tab sheets must have their TabVisible property set. False to check all tab sheets.

## Description

SelectNextPage is an overloaded method used to locate and activate the next page (or tab sheet) in the specified direction.

GoForward indicates the search direction for the next page. When set to False, the pages prior to ActivePage are examined. When set to True, the pages after active page are used.

An overloaded variant provides the CheckTabVisible argument, which forces use of tab sheets with their TabVisible property set to True.

SelectNextPage calls the FindNextPage method to locate the next tab sheet in the specified direction. If a tab sheet is found, it is assigned to the ActivePage property for the control.

## See also

TPageControl.FindNextPage |  | Gets the next tab sheet in the specified direction.
TPageControl.Pages |  | Provides indexed access to the pages (tab sheets) on the page control.
TPageControl.ActivePage |  | The currently selected and active page (TTabSheet) on the page control.