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

TCustomTabControl.PageIndex

Ordinal position for the selected page on the tabbed control.

Declaration

Source position: comctrls.pp line 502

public property TCustomTabControl.PageIndex : Integer
  read FPageIndex
  write SetPageIndex
  default - 1;

Description

PageIndex is an Integer property which indicates the ordinal position in the page list for the selected page object on the tabbed control. The default value for the property is -1 and indicates that a page/ tab is not active on the control.

Changing the value for the property causes the OnChange event handler to be signalled when nboDoChangeOnSetIndex has been included in the Options for the control. OnChange is not signalled at design-time - even when enabled in Options. The InternalSetPageIndex method is called to update the property value and the design-time flags for the control. The new value is also sent to the widgetset class instance.

No actions are needed or performed when PageIndex is set to -1, or when its value is larger than PageCount-1.

The value in PageIndex is used to determine the value for both the ActivePage and ActivePageComponent properties. Changing the value in either of these properties causes PageIndex to be updated (when allowed by Options and CanChangePageIndex).

See also

TCustomTabControl.Options

  

The set of Options enabled for the tabbed control.

TCustomTabControl.PageCount

  

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

TCustomTabControl.Pages

  

The list of captions for the page objects on the control.

TCustomTabControl.Tabs

  

Contains the list of pages accessible in the tabbed control.

TCustomTabControl.TabToPageIndex

  

Gets the real page index for the specified tab.

TCustomTabControl.ActivePage

  

Caption for the active page in the tabbed control.

TCustomTabControl.ActivePageComponent

  

The active TCustomPage instance for the tabbed control.

TCustomTabControl.OnChange

  

Event handler signalled when the active page (or tab) for the control is changed.

TCustomTabControl.CanChange

  

Signals the OnChanging event handler prior to updates to PageIndex.

TCustomTabControl.CanChangePageIndex

  

CanChangePageIndex - determine whether it is permissible to change the index of the page.


Version 4.0 Generated 2025-05-03 Home