Previous Topic

Next Topic

Inhoudsopgave

Book Index

TTabSheet Control

TTabSheet

Description

Represents an individual page in a TPageControl control.

Remarks

Use TTabSheet to represent a single page in a tabbed page control. Tab sheets are typically referred to as pages. TPageControl maintains an indexed array of its tab sheets in its Pages property. Users can click on a tab to activate the tab sheet.

TTabSheet Properties

Property Property PageControl: TPageControl (R/W)

Indicates the page control object that contains the tab sheet. Read PageControl to gain access to the page control object that uses the tab sheet. The properties and methods of the PageControl object can be used to locate the selected page, iterate through the other pages in the page control, or change the display properties of the tabs. Set PageControl to remove the tab sheet from its current page control (if any) and insert it into a new page control.

Property Property PageIndex: Integer (R/W)

Indicates the index of the tab sheet in the list of tab sheets maintained by the page control. Use PageIndex to determine where the tab sheet sits in its page control. Each tab sheet in a page control is automatically assigned a PageIndex when it is inserted in the page control. The first tab sheet receives a value of 0, the second has a value of 1, and so on. PageIndex values are reassigned if tab sheets are deleted or moved. To access a particular tab sheet given its index value, use the indexed Pages property of the TPageControl object.

Property Property TabIndex: Integer (R)

Indicates the position of the tab sheet in the set of visible tabs in a TPageControl object. Read TabIndex to determine where the user sees the tab sheet. A value of 0 indicates the first visible tab sheet, a value of 1 indicates the second visible tab sheet, and so on. TabIndex is always less than or equal to PageIndex. For example, a tab sheet that has a PageIndex of 3 will have a TabIndex of 2 if one of the previous tab sheets in the page control is not visible. If a tab sheet's TabVisible property is false, the TabIndex property is -1.

Property Property TabVisible: Boolean (R/W)

Specifies whether the tab of the TTabSheet object appears in its TPageControl. Use TabVisible to temporarily remove a tab sheet from a page control. When TabVisible is false, the tab does not appear in the page control and its TabIndex property is -1. Setting TabVisible to true allows the user to see the tab of the tab sheet again.