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

TPageControl.FindNextPage

Gets the next tab sheet in the specified direction.

Declaration

Source position: comctrls.pp line 595

public function TPageControl.FindNextPage(

  CurPage: TTabSheet;

  GoForward: Boolean;

  CheckTabVisible: Boolean

):TTabSheet;

Arguments

CurPage

  

Tab sheet where the search is started.

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.

Function result

Tab sheet which matches the search criteria and direction. Nil if no tab sheets have been defined on the page control.

Description

FindNextPage is a TTabSheet function used to get the next tab sheet (or page) in the specified direction.

CurPage contains the TTabSheet instance where the search is started. If CurPage is not found in the list of Pages, the search starts at the first or last tab sheet in the specified search direction. The first when GoForward is False, and the last when GoForward is True.

GoForward indicates the direction for the search. When set to True, subsequent Pages after the value in CurPage are used. When set to False, previous pages are examined.

CheckTabVisible indicates whether the TTabSheet must be visible in the list of Pages. When set to True, the TabVisible property for the next tab sheet must also be set to True. If TabVisible is False, the tab sheet is skipped. When CheckTabVisible is set to False (the default value), all tab sheets in Pages are used.

The return value contains the first tab sheet that matches the search criteria and direction. The can be the same as CurPage if another tab sheet is not found. The return value is Nil when PageCount contains 0 (no tab sheets have been created).

FindNextPage is used to implement the SelectNextPage method.

See also

TPageControl.SelectNextPage

  

Locates and activates the next page in the specified direction.

TPageControl.Pages

  

Provides indexed access to the pages (tab sheets) on the page control.

TCustomTabControl.PageCount

  

Returns the number of page objects stored in the internal page list for the tabbed control.

TTabSheet.TabVisible

  

Indicates if the tab is visible in the Parent control.


Version 3.2 Generated 2024-02-25 Home