Sign in Join
FPDoc Onlineexperiment

TPageControl.FindNextPage function

Member of TPageControlpublicIn unit ComCtrls

Gets the next tab sheet in the specified direction.

Declaration

pascal
function FindNextPage(CurPage: TTabSheet; GoForward: Boolean; 
 CheckTabVisible: Boolean): TTabSheet

Arguments

CurPage

Tab sheet where the search is started.

GoForwardTrue to search for a subsequent tab sheet. False to search for a prior tab sheet.
CheckTabVisibleTrue 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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.