TCustomTabControl.PageToTabIndex function
Maps a LCL page index to a tab index in the widgetset class.
Declaration
function PageToTabIndex(AIndex: Integer): IntegerArguments
AIndex | Ordinal position for the page object in the internal list. |
Function result
Ordinal position for the page object in the list of visible tabs on the control.
Description
PageToTabIndex is an
Integer function used to get the
tab index for the specified page index. A page index is the physical location
in the list of page objects. A tab index, on the other hand, is the logical
position within the visible tabs on the tabbed control.
AIndex is the ordinal position in the page list for a tab, and is
converted to the logical tab index in the return value. Values in AIndex must
be in the range
0..PageCount-1.
The return value contains the position for the tab when only visible tabs are taken into consideration. In other words, the physical page index minus any preceding page objects with their TabVisible property set to False.
The return value is -1 when AIndex has a value less than 0 (zero) or greater than PageCount-1, or when the page object at the position in AIndex is not visible.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
