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

# TCustomPage.VisibleIndex

Gets the index number for a visible page within all of the visible pages.

## Declaration

Source position: comctrls.pp line 265

`public function TCustomPage.VisibleIndex: Integer; virtual;`

## Function result

Ordinal position for the visible page, or -1 when not found or not visible.

## Description

VisibleIndex is an Integer function used to get the ordinal position for the page instance within the list of visible pages for the Parent control.

When Parent is a TCustomTabControl descendant, its TCustomPage instances are examined to find the current class instance. At run-time, only pages with the TabVisible property set to True are considered in the method. At design-time, all pages are examined.

The return value is the relative position in the list of visible pages where the current class instance was found. The return value is -1 if the current page was not found in the Parent control, or when none of the pages in the Parent control are visible.

When Parent is not derived from TCustomTabControl, the return value is always -1.