CustomTabControl

Qualified name: delphivcl.CustomTabControl

class CustomTabControl

Bases: WinControl

TCustomTabControl is the base type for tab control components such as TTabControl and TPageControl. Use TCustomTabControl as a base class when defining a control that includes a set of notebook style tabs across the top. TCustomTabControl introduces many properties, methods, and events to manage appearance and behavior of the tabs, and to respond when the user selects one of the tabs.

Note: When using one of the page controls, if you want to restrict a user from switching to a tab, you cannot set TTabSheet.Enabled to false to accomplish that restriction. Instead, use the OnChanging event to prevent the user from selecting a tab.

Methods

CanFocus

Indicates whether a control can receive focus.

GetHitTestInfoAt

Returns information about the location of a point relative to the client area of the tab control.

IndexOfTabAt

Indicates the index of the tab at a specified point.

RowCount

Sets TabIndex property.

ScrollTabs

Scrolls the tabs that are visible when the tab control is not multi-line.

SetFocus

Gives the input focus to the control.

TabRect

Returns the bounding rectangle for a specified tab.

Attributes

Action

Specifies the action associated with the control.

Align

Determines how the control aligns within its container (parent control).

AlignDisabled

Indicates child control realignment disabled.

AlignWithMargins

Specifies whether a control should be constrained by margins.

Anchors

Specifies how the control is anchored to its parent.

BiDiMode

Specifies the bidirectional mode for the control.

BoundsRect

Specifies the bounding rectangle of the control, expressed in the coordinate system of the parent control.

Brush

Determines the color and pattern used for painting the background of the control.

Canvas

Gives access to the tab control's canvas.

ClassName

Returns the TObject.ClassName

ClientHeight

Specifies the height of the control's client area in pixels.

ClientOrigin

Specifies the screen coordinates (in pixels) of the upper-left corner of a control's client area.

ClientRect

Specifies the size of a control's client area in pixels.

ClientWidth

Specifies the horizontal size of the control's client area in pixels.

ComObject

Specifies the interface reference implemented by the component.

ComponentCount

Returns the owned component count

ComponentIndex

Indicates the position of the component in its owner's Components property array.

ComponentState

Describes the current state of the component, indicating when a component needs to avoid certain actions.

ComponentStyle

Governs the behavior of the component.

Components

Returns an iterator over the owned components

Constraints

Specifies the size constraints for the control.

ControlCount

Returns the count of contained controls

ControlState

Specifies the current state of a control at run time.

ControlStyle

Determines style characteristics of the control.

Controls

Returns an iterator over contained controls

CurrentPPI

Embarcadero Technologies does not currently have any additional information.

Cursor

Specifies the image used to represent the mouse pointer when it passes into the region covered by the control.

CustomHint

CustomHint is a custom hint for the control.

DesignInfo

Contains information used by the Form designer.

DockClientCount

Specifies the number of controls that are docked on the windowed control.

DockClients

Control:

DockManager

Specifies the control's docking manager interface.

DockOrientation

DockOrientation specifies how the control is docked relative to other controls docked in the same parent.

DockSite

Specifies whether the control can be the target of drag-and-dock operations.

DoubleBuffered

Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first.

DoubleBufferedMode

DoubleBufferedMode:

Enabled

Controls whether the control responds to mouse, keyboard, and timer events.

ExplicitHeight

Specifies the explicit vertical size of the control in pixels.

ExplicitLeft

Specifies the explicit horizontal pixel coordinate of the left edge of a component relative to its parent.

ExplicitTop

Specifies the explicit vertical pixel coordinate of the top edge of a component relative to its parent.

ExplicitWidth

Specifies the explicit horizontal size of the control in pixels.

Floating

Specifies whether the control is floating.

FloatingDockSiteClass

Specifies the class of the temporary control that hosts the control when it is floating.

Focused

Determines whether the control has input focus.

Handle

Provides access to the underlying Windows screen object for the control.

HandleAllocated

Reports whether a screen object handle exists for the control.

Height

Specifies the vertical size of the control in pixels.

HelpContext

The HelpContext property contains the numeric context ID that identifies the Help topic for the control.

HelpKeyword

The HelpKeyword property contains the keyword string that identifies the Help topic for the control.

HelpType

Specifies whether the control's context-sensitive Help topic is identified by a context ID or by keyword.

Hint

Hint contains the text string that appears when the user moves the mouse over the control.

HostDockSite

Specifies the control in which the control is docked.

IsDrawingLocked

IsDrawingLocked property returns True when redrawing for this control is locked.

LRDockWidth

Specifies the width of the control when it is docked horizontally.

Left

Specifies the horizontal coordinate of the left edge of a component relative to its parent.

Margins

Specifies the margins of the control.

MouseInClient

Indicates whether the mouse pointer is currently in the client area of the control.

Name

Specifies the name of the component as referenced in code.

Observers

Indicates the TObservers object added to the TComponent.

Owner

Returns the Component Owner

Padding

Specifies the padding of a control.

Parent

Returns/Sets the Control Parent

ParentCustomHint

Specifies where a control looks for its custom hint.

ParentDoubleBuffered

ParentDoubleBuffered defers the DoubleBuffered property of this component to the value of the parent's DoubleBuffered property.

ParentWindow

Reference to parent's underlying control.

PixelsPerInch

Embarcadero Technologies does not currently have any additional information.

RedrawDisabled

RedrawDisabled property returns True when redrawing for this control is locked.

ScaleFactor

Embarcadero Technologies does not currently have any additional information.

ShowHint

ShowHint specifies whether to show the Help Hint when the mouse pointer moves over the control.

Showing

Indicates whether the control is showing on the screen.

StyleElements

Specifies the style elements that are used by the control.

StyleName

Embarcadero Technologies does not currently have any additional information.

TBDockHeight

Specifies the height of the control when it is docked vertically.

TabOrder

Indicates the position of the control in its parent's tab order.

TabStop

Determines whether the user can tab to a control.

Tag

Stores a NativeInt integral value as a part of a component.

Top

Specifies the Y coordinate of the upper-left corner of a control, relative to its parent or containing control in pixels.

Touch

Specifies the touch manager component associated with the control.

UndockHeight

Specifies the height of the control when it is floating.

UndockWidth

Specifies the width of the control when it is floating.

UseDockManager

Specifies whether the docking manager is used in drag-and-dock operations.

VCLComObject

Represents information used internally by components that support COM.

Visible

Specifies whether the component appears onscreen.

VisibleDockClientCount

Specifies the number of visible controls that are docked on the windowed control.

Width

Specifies the horizontal size of the control or form in pixels.

CanFocus()

Indicates whether a control can receive focus.

Canvas

Gives access to the tab control’s canvas. Use Canvas to paint to the tab control’s canvas during the OnDrawTab event.

Type:

Canvas

ControlCount

Returns the count of contained controls

Controls

Returns an iterator over contained controls

Focused

Determines whether the control has input focus.

GetHitTestInfoAt(X: int, Y: int) HitTests

Returns information about the location of a point relative to the client area of the tab control. Call GetHitTestInfoAt to determine what portion of the tab control, if any, sits under the point specified by the X and Y parameters. GetHitTestInfo returns a THitTests type. This set describes the possible elements under the mouse. When interpreting these values, each tab can be considered an “item” of the tab control.

Handle

Provides access to the underlying Windows screen object for the control.

HandleAllocated

Reports whether a screen object handle exists for the control.

IndexOfTabAt(X: int, Y: int) int

Indicates the index of the tab at a specified point. Use IndexOfTabAt to locate which tab is at the point specified by X and Y. If the point with X-coordinate X and Y-coordinate Y is over a tab, IndexOfTabAt returns the 0-offset index of that tab in the Tabs property (TTabControl) or in the Pages property (TPageControl). If the point defined by X and Y is not over a tab, IndexOfTabAt returns 1.

ParentWindow

Reference to parent’s underlying control.

RowCount()

Sets TabIndex property. RowCount is called to change the value of the TabIndex property. Descendant classes should override RowCount to provide special implementations of this property.

ScrollTabs(Delta: int) None

Scrolls the tabs that are visible when the tab control is not multi-line. Call ScrollTabs to change the tabs that are visible in the tab control. When Delta is positive, Delta additional tabs to the right are scrolled into view. When Delta is negative, the tabs to the left are scrolled into view, with the absolute value of Delta indicating how many tabs are scrolled. If there are fewer than the absolute value of Delta tabs in the indicated direction, ScrollTabs scrolls as far as possible. ScrollTabs has no effect if there are no scrolled tabs, either because the control is wide enough to display all tabs or because the MultiLine property is true.

Note: ScrollTabs scrolls the visible tabs. It does not change the current selection. Calling ScrollTabs may scroll the selected tab out of view.

SetFocus()

Gives the input focus to the control.

Showing

Indicates whether the control is showing on the screen.

TabRect(Index: int) Rect

Returns the bounding rectangle for a specified tab. Use TabRect to determine the current position of the tab with the specified index. Index is the 0-offset index of a tab in the Tabs property (TTabControl) or in the Pages property (TPageControl). TabRect returns the bounding rectangle (in client coordinates) of the specified tab.

TabStop

Determines whether the user can tab to a control. Use the TabStop to allow or disallow access to the control using the Tab key. If TabStop is True, the control is in the tab order. If TabStop is False, the control is not in the tab order and the user cannot press the TAB key to move to the control.

Note: TabStop is not meaningful for a form unless the form assigns another form to be its parent.

Type:

bool