TTabControl class
TTabControl - a series of
Tabs along the edge of a
display area; selection of a
Tab governs the contents of the
DisplayRect.Declaration
TTabControl = class(TCustomTabControl)Inheritance
Description
TTabControl - a series of
Tabs along the edge of a
display area; selection of a
Tab governs the contents of the
DisplayRect
Use TTabControl by selecting its icon from the Common Controls tab
of the IDE Component Palette and placing it at the desired location on the
Form. Use the Form Designer and Object Inspector to adjust its
shape, size, alignment, anchoring and other properties. Tabs can be added or
removed from the component by selecting it, then right-clicking with the
mouse to get a pop-up menu whose first item is 'Add Tab'. Once created, the
Tabs can be edited by selecting the Tabs entry in the Object
Inspector and selecting the ellipsis (...) which will cause a pop-up String
editor to appear. The tabs can be given new captions, moved up and down the
list or removed altogether as required.
Each Tab has an Index (starting from 0) and this index can be used to specify
an entry from Images for display in the DisplayRect.
See also
Properties
DisplayRect | public | Display area for the tab control. |
HotTrack | published | Enables or disables drawing a "hot-lighted" tab when the mouse pointer is hovered over the control. |
Images | published | Contains the images displayed on the tabs for the control. |
ImagesWidth | published | Width for the Images used in the control. |
MultiLine | published | Indicates whether the caption on a tab can have multiple lines of text. |
MultiSelect | published | Indicates whether multiple tabs can be simultaneously selected on the tabbed control. |
OwnerDraw | published | Reads and write the value for the OwnerDraw property in Tabs. |
RaggedRight | published | Enables or disables justified text in the captions for tabs on the control. |
ScrollOpposite | published | Indicates whether unused multi-line tabs are scrolled to the side opposite of the tab position. |
Style | published | Indicates the appearance or display style used for the tabs on the control. |
TabPosition | published | Indicates the edge where the tabs for the control are aligned. |
TabHeight | published | Height in pixels for the tabs on the control. |
TabIndex | published | Contains the ordinal position for the active Tab in the control. |
Tabs | published | Contains the list of pages accessible in the tabbed control. |
TabStop | published | Enables or disables navigation using the Tab key. |
TabWidth | published | Width in pixels for the tabs on the control. |
Align | published | Specifies the placement of the control on its Parent control. |
Anchors | published | The set of anchor definitions for this control. |
BiDiMode | published | Indicates whether text controls use in bi-directional reading. |
BorderSpacing | published | Determines the inner and outer border spacing for this control. |
Constraints | published | Contains the minimum and maximum Width and Height for the control. |
DockSite | published | Allows controls to be drag-and-dock-ed into this control. |
DragCursor | published | The cursor shape shown during a drag operation. |
DragKind | published | Indicates the action performed for a drag operation: drag-and-drop or drag-and-dock. |
DragMode | published | Determines how a drag operation is started for the control. |
Enabled | published | Determines whether the control responds to mouse or keyboard input. |
Font | published | The font to be used for text display in this control. |
Options | published | The set of Options enabled for the tabbed control. |
ParentBiDiMode | published | Indicates whether the BiDiMode settings in the Parent control are used. |
ParentFont | published | Indicates if the Font from the Parent control is used in the control. |
ParentShowHint | published | If True, the value of ShowHint for the control will be the same as the one from the Parent. Default is True. |
PopupMenu | published | A context-sensitive menu that pops up when the right mouse button is clicked over this control. |
ShowHint | published | Enables Hint display for the control. |
TabOrder | published | Indicates the navigation order for the control when the user presses the Tab or Shift+Tab key. |
Visible | published | Allows the control, and all of its children, to be displayed or hidden. |
Methods
WSRegisterClass | protected | Registers the class type with the widgetset. |
SetOptions | protected | Sets the value for the Options property. |
AddRemovePageHandle | protected | Not implemented in TTabControl. Page handles are not used. |
CanChange | protected | Indicates whether the tab control can update its Tabs property. |
CanShowTab | protected | Indicates if the control can show the tab at the specified position. |
Change | protected | Changes the active tab for the control. |
CreateWnd | protected | Creates the Handle for the widgetset object and displays the selected tab and page. |
DestroyHandle | protected | Destroys the handle for the control and all child controls. |
DestroyWnd | protected | Frees the handle for a Canvas allocated for the control. |
Notification | protected | Handles the notification when a component is added to or removed from the class instance. |
SetDragMode | protected | Sets the value for the DragMode property. |
SetTabIndex | protected | Sets the value for the TabIndex property. |
UpdateTabImages | protected | Calls the corresponding method in Tabs. |
ImageListChange | protected | Calls the corresponding method in Tabs. |
DoSetBounds | protected | Updates the bounds for the control to the specified values. |
GetControlClassDefaultSize | protected | Gets the default size for new instances of the class. |
PaintWindow | protected | Updates the canvas handle and paints the control. |
Paint | protected | Paints the control to its Canvas using theme services. |
AdjustDisplayRectWithBorder | protected | Adjust the specified display rectangle to use the size in Tabs. |
AdjustClientRect | protected | Calls the AdjustDisplayRect method. |
CreateTabNoteBookStrings | protected | Creates the TTabControlNoteBookStrings instance used in Tabs. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
IndexOfTabAt | public | Gets the position for the tab at the specified mouse coordinates. |
GetHitTestInfoAt | public | Gets a set of hit test results for the specified mouse coordinates. |
GetImageIndex | public | Signals the OnGetImageIndex event handler to get an image for the specified tab index. |
IndexOfTabWithCaption | public | Gets the ordinal position for the tab with the specified Caption. |
TabRect | public | Gets the rectangle where the tab at the specified position is drawn. |
RowCount | public | Gets the number of rows needed to render the Tabs on the control. |
ScrollTabs | public | Scrolls the tabs on the control horizontally by the value specified in Delta. |
BeginUpdate | public | Starts an update process for the control. |
EndUpdate | public | Finishes an update process for the control. |
IsUpdating | public | Indicates if there are unfinished updates for one of the Tabs on the control. |
Events
OnChange | published | Event handler signalled when the active page (or tab) for the control is changed. |
OnChanging | published | Event handler signalled prior to changing the active tab/page on the tabbed control. |
OnGetImageIndex | published | Event handler signalled to get the image index for a tab on the tabbed control. |
OnChangeBounds | published | Event handler signalled when the Bounds for the control have been changed. |
OnContextPopup | published | Invoked when a context-sensitive pop-up menu is requested. |
OnDockDrop | published | Event handler signalled for the drop of a control to be docked. |
OnDockOver | published | Event handler signalled when a control is moved over a docksite; determines whether the drop event is accepted or rejected. |
OnDragDrop | published | Event handler signalled when an object is dropped onto the control. |
OnDragOver | published | Event handler signalled when a control is dragged over the control instance. |
OnEndDock | published | Event handler signalled for the end of a drag-dock operation. |
OnEndDrag | published | Event handler signalled for the end of a drag-drop operation. |
OnEnter | published | Event handler signalled when the control receives focus. |
OnExit | published | Event handler signalled when the control loses focus. |
OnGetSiteInfo | published | Provides information about the DockSite for the control. |
OnMouseDown | published | Event handler signalled when a mouse down event is handled for the control. |
OnMouseEnter | published | Event handler signalled when the mouse pointer has entered the control. |
OnMouseLeave | published | Event handler signalled when the mouse pointer has left the control. |
OnMouseMove | published | Event handler signalled when the mouse pointer is moved in the control. |
OnMouseUp | published | Event handler signalled when a mouse up event is handled for the control. |
OnMouseWheel | published | Event handler for mouse wheel turned. |
OnMouseWheelDown | published | Event handler signalled for a downward movement of the mouse wheel. |
OnMouseWheelUp | published | Event handler signalled for an upward movement of the mouse wheel. |
OnResize | published | Notification handler for a resize of the control. |
OnStartDock | published | Event handler for the start of a docking operation. |
OnStartDrag | published | Event handler signalled for the start of a dragging operation. |
OnUnDock | published | Event handler signalled before a control is undocked from its DockSite. |
Inherited
From TCustomTabControl (39)
ActivePage ActivePageComponent CanChangePageIndex CNNotify CustomPage DialogChar DoAutoAdjustLayout DoChange DoCloseTabClicked GetCapabilities GetListClass GetMinimumTabHeight GetMinimumTabWidth GetPage GetPageClass GetPageCount IndexOf IndexOfPageAt InitializeWnd InsertPage InternalSetPageIndex KeyDown Loaded MaybeSelectFirstControlOnPage OnCloseTabClicked Page PageCount PageIndex Pages PageToTabIndex ReadState RemovePage ShowControl ShowTabs SwitchingToPageIndex TabToPageIndex UpdateTabProperties WheelSelectPage WMSetFocus
From TWinControl (222)
AddControl AlignControls AllAutoSized AutoAdjustLayout AutoSizeDelayed AutoSizeDelayedHandle AutoSizeDelayedReport AutoSizePhases BeginUpdateBounds BorderStyle BorderWidth BoundsLockCount BroadCast Brush BrushCreated CachedClientHeight CachedClientWidth CalculatePreferredSize CanFocus CanSetFocus CanTab ChangeScale ChildClassAllowed ChildHandlesCreated ChildKey ChildSizing ClientRectNeedsInterfaceUpdate CMBiDiModeChanged CMBorderChanged CMDoubleBufferedChanged CMEnabledChanged CMEnter CMExit CMParentDoubleBufferedChanged CMShowHintChanged CMShowingChanged CMVisibleChanged CNChar CNKeyDown CNKeyUp CNSysKeyDown CNSysKeyUp ContainsControl ControlAtPos ControlCount ControlKeyDown ControlKeyUp Controls ControlsAligned CreateBrush CreateDockManager CreateHandle CreateParams CreateParented CreateParentedControl CreateSubClass CustomAlignInsertBefore CustomAlignPosition DefaultHandler DefWndProc DesignerDeleting DisableAlign DoAddDockClient DoAdjustClientRectChange DoAlignChildControls DoAllAutoSize DoAutoSize DoChildSizingChange DockClientCount DockClients DockDrop DockManager DockOver DoConstraintsChange DoDockClientMsg DoDockOver DoDragMsg DoEnter DoExit DoFlipChildren DoFloatMsg DoGetDockCaption DoKeyDownBeforeInterface DoKeyPress DoKeyUpBeforeInterface DoRemainingKeyDown DoRemainingKeyUp DoRemoveDockClient DoSendBoundsToInterface DoSendShowHideToInterface DoubleBuffered DoUnDock DoUndockClientMsg DoUTF8KeyPress EnableAlign EndUpdateBounds EraseBackground FinalizeWnd FindChildControl FindNextControl FixDesignFontsPPIWithChildren FixupTabList FlipChildren Focused FontChanged FormEndUpdated GetAdjustedLogicalClientRect GetBorderStyle GetChildren GetChildrenRect GetClientOrigin GetClientRect GetControlIndex GetControlOrigin GetDeviceContext GetDockCaption GetEnumeratorControls GetEnumeratorControlsReverse GetMouseCapture GetParentHandle GetPreferredSizeClientFrame GetSiteInfo GetTabOrderList GetTextLen GetTopParentHandle Handle HandleAllocated HandleNeeded InsertControl IntfGetDropFilesTarget IntfUTF8KeyPress Invalidate InvalidateBoundsRealized InvalidateClientRectCache InvalidatePreferredChildSizes IsClientHeightStored IsClientWidthStored IsControlMouseMsg IsFlipped IsResizing IsSpecialSubControl KeyDownAfterInterface KeyDownBeforeInterface KeyPress KeyUp KeyUpAfterInterface KeyUpBeforeInterface LockRealizeBounds MainWndProc NotifyControls OnAlignInsertBefore OnAlignPosition OnGetDockCaption OnKeyDown OnKeyPress OnKeyUp OnUTF8KeyPress PaintControls PaintHandler PaintTo ParentDoubleBuffered ParentFormHandleInitialized ParentHandlesAllocated ParentWindow PerformTab RealGetText ReAlign RealizeBounds RealizeBoundsRecursive RealSetText ReloadDockedControl RemoveControl RemoveFocus Repaint ScaleBy ScaleControls ScrollBy ScrollBy_WS SelectFirst SelectNext SendDialogChar SendMoveSizeMessages SetBorderStyle SetBounds SetChildZPosition SetColor SetControlIndex SetDockManager SetFocus SetShape SetTempCursor Showing UnlockRealizeBounds Update UpdateControlState UpdateDockCaption UpdateShowing UseDockManager UTF8KeyPress VisibleDockClientCount WindowHandle WMChar WMContextMenu WMDestroy WMEnter WMEraseBkgnd WMExit WMKeyDown WMKeyUp WMKillFocus WMMove WMNotify WMPaint WMShowWindow WMSize WMSysChar WMSysKeyDown WMSysKeyUp WMWindowPosChanged WndProc WriteLayoutDebugReport WSSetText
From TControl (329)
AccessibleDescription AccessibleName AccessibleRole AccessibleValue Action ActionChange ActionLink ActiveDefaultControlChanged AddHandler AddHandlerOnBeforeDestruction AddHandlerOnChangeBounds AddHandlerOnEnabledChanged AddHandlerOnEnabledChanging AddHandlerOnKeyDown AddHandlerOnMouseWheel AddHandlerOnResize AddHandlerOnVisibleChanged AddHandlerOnVisibleChanging AdjustSize AnchorAsAlign AnchorClient AnchoredControlCount AnchoredControls AnchorHorizontalCenterTo AnchorParallel AnchorSame AnchorSide AnchorSideBottom AnchorSideChanged AnchorSideLeft AnchorSideRight AnchorSideTop AnchorToCompanion AnchorToNeighbour AnchorVerticalCenterTo AssignTo AutoSize AutoSizing AutoSizingAll AutoSizingLockCount BaseBounds BaseParentClientSize BeforeDestruction BeforeDragStart BeginAutoDrag BeginAutoSizing BeginDrag BoundsChanged BoundsRect BoundsRectForNewParent BringToFront CalculateDockSizes CanAutoSize Caption CaptureChanged CaptureMouseButtons ChangeBounds Changed CheckChildClassAllowed CheckNewParent CheckOnChangeBounds Click ClientHeight ClientOrigin ClientRect ClientToParent ClientToScreen ClientWidth CMChanged CMCursorChanged CMHintShow CMHitTest CMMouseEnter CMMouseLeave CMParentBiDiModeChanged CMParentColorChanged CMParentFontChanged CMParentShowHintChanged CMSysFontChanged CMTextChanged CNPreferredSizeChanged Color ColorIsStored ConstrainedResize ControlFontClass ControlOrigin ControlState ControlStyle ControlToScreen CreateAccessibleObject CreateControlBorderSpacing CreateFloatingDockSite Cursor DblClick DefineProperties DesktopFont DisableAutoSizing DoBorderSpacingChange DoCallKeyEventHandler DoCallMouseWheelEventHandler DoCallNotifyHandler Dock Docked DockOrientation DockTrackNoTarget DoContextPopup DoDock DoEndDock DoEndDrag DoFixDesignFontPPI DoMouseDown DoMouseUp DoMouseWheel DoMouseWheelDown DoMouseWheelHorz DoMouseWheelLeft DoMouseWheelRight DoMouseWheelUp DoOnChangeBounds DoOnParentHandleDestruction DoOnResize DoOnShowHint DoScaleFontPPI DoStartDock DoStartDrag DragCanceled DragDrop Dragging DragOver EditingDone EnableAutoSizing EnabledChanged EnabledChanging EndAutoSizing EndDrag ExecuteCancelAction ExecuteDefaultAction FindSubComponent FixDesignFontsPPI Floating FloatingDockSiteClass ForeignAnchorSideChanged FormIsUpdating GetAccessibleObject GetAction GetActionLinkClass GetAnchorsDependingOnParent GetCachedText GetCanvasScaleFactor GetChildAccessibleObjectAtPos GetClientScrollOffset GetColorResolvingParent GetCursor GetDefaultColor GetDefaultDockCaption GetDefaultHeight GetDefaultWidth GetDockEdge GetDragImages GetEnabled GetFloating GetFloatingDockSiteClass GetLogicalClientRect GetMousePosFromMessage GetPalette GetParentBackground GetParentComponent GetPopupMenu GetPreferredSize GetRGBColorResolvingParent GetScrolledClientRect GetSelectedChildAccessibleObject GetSidePosition GetTextBuf GetTopParent HandleObjectShouldBeVisible HasHelp HasParent Height HeightIsAnchored HelpContext HelpKeyword HelpType Hide Hint HostDockSite InitiateAction InvalidateControl InvalidatePreferredSize IsAParentAligning IsBorderSpacingInnerBorderStored IsCaptionStored IsControl IsControlVisible IsEnabled IsParentColor IsParentFont IsParentOf IsProcessingPaintMsg IsRightToLeft IsVisible Left LMCaptureChanged LoadedAll LRDockWidth ManualDock ManualFloat MouseCapture MouseDown MouseEnter MouseInClient MouseLeave MouseMove MouseUp OnClick OnConstrainedResize OnDblClick OnEditingDone OnMouseWheelHorz OnMouseWheelLeft OnMouseWheelRight OnQuadClick OnShowHint OnTripleClick Parent ParentBackground ParentColor ParentDestroyingHandle ParentFontChanged ParentToClient Perform PositionDockRect QuadClick ReadBounds Refresh RemoveAllHandlersOfObject RemoveHandler RemoveHandlerOnBeforeDestruction RemoveHandlerOnChangeBounds RemoveHandlerOnEnabledChanged RemoveHandlerOnEnabledChanging RemoveHandlerOnKeyDown RemoveHandlerOnMouseWheel RemoveHandlerOnResize RemoveHandlerOnVisibleChanged RemoveHandlerOnVisibleChanging ReplaceDockedControl RequestAlign Resize Scale96ToFont Scale96ToForm Scale96ToScreen ScaleConstraints ScaleDesignToForm ScaleFontsPPI ScaleFontTo96 ScaleFontToScreen ScaleFormTo96 ScaleFormToDesign ScaleScreenTo96 ScaleScreenToFont ScreenToClient ScreenToControl SendToBack SessionProperties SetAction SetAlign SetAnchors SetAutoSize SetBiDiMode SetBoundsKeepBase SetCursor SetEnabled SetHint SetInitialBounds SetName SetParent SetParentBackground SetParentBiDiMode SetParentComponent SetTextBuf SetVisible SetZOrder ShouldAutoAdjust Show ShowHelp TBDockHeight Text TextChanged Top TripleClick UndockHeight UndockWidth UpdateAnchorRules UpdateBaseBounds UpdateMouseCursor UpdateRolesForForm UseRightToLeftAlignment UseRightToLeftReading UseRightToLeftScrollBar VisibleChanged VisibleChanging Width WidthIsAnchored WindowProc WMCancelMode WMLButtonDBLCLK WMLButtonDown WMLButtonQuadCLK WMLButtonTripleCLK WMLButtonUp WMMButtonDBLCLK WMMButtonDown WMMButtonQuadCLK WMMButtonTripleCLK WMMButtonUp WMMouseHWheel WMMouseMove WMMouseWheel WMRButtonDBLCLK WMRButtonDown WMRButtonQuadCLK WMRButtonTripleCLK WMRButtonUp WMXButtonDBLCLK WMXButtonDown WMXButtonQuadCLK WMXButtonTripleCLK WMXButtonUp
From TLCLComponent (6)
DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance WidgetSetClass
From TComponent (64)
_AddRef _Release CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetTypeInfo GetTypeInfoCount iicrGetComponent InsertComponent Invoke IsImplementorOf Loading Name ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (4)
Assign FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (35)
AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
