Sign in Join
FPDoc Onlineexperiment

TTabControl class

In unit ComCtrls

TTabControl - a series of Tabs along the edge of a display area; selection of a Tab governs the contents of the DisplayRect.

Declaration

pascal
TTabControl = class(TCustomTabControl)

Inheritance

  1. TTabControl
  2. TCustomTabControl
  3. TWinControl
  4. TControl
  5. TLCLComponent
  6. TComponent
  7. TPersistent
  8. TObject

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

DisplayRectpublicDisplay area for the tab control.
HotTrackpublishedEnables or disables drawing a "hot-lighted" tab when the mouse pointer is hovered over the control.
ImagespublishedContains the images displayed on the tabs for the control.
ImagesWidthpublishedWidth for the Images used in the control.
MultiLinepublishedIndicates whether the caption on a tab can have multiple lines of text.
MultiSelectpublishedIndicates whether multiple tabs can be simultaneously selected on the tabbed control.
OwnerDrawpublishedReads and write the value for the OwnerDraw property in Tabs.
RaggedRightpublishedEnables or disables justified text in the captions for tabs on the control.
ScrollOppositepublishedIndicates whether unused multi-line tabs are scrolled to the side opposite of the tab position.
StylepublishedIndicates the appearance or display style used for the tabs on the control.
TabPositionpublishedIndicates the edge where the tabs for the control are aligned.
TabHeightpublishedHeight in pixels for the tabs on the control.
TabIndexpublishedContains the ordinal position for the active Tab in the control.
TabspublishedContains the list of pages accessible in the tabbed control.
TabStoppublishedEnables or disables navigation using the Tab key.
TabWidthpublishedWidth in pixels for the tabs on the control.
AlignpublishedSpecifies the placement of the control on its Parent control.
AnchorspublishedThe set of anchor definitions for this control.
BiDiModepublishedIndicates whether text controls use in bi-directional reading.
BorderSpacingpublishedDetermines the inner and outer border spacing for this control.
ConstraintspublishedContains the minimum and maximum Width and Height for the control.
DockSitepublishedAllows controls to be drag-and-dock-ed into this control.
DragCursorpublishedThe cursor shape shown during a drag operation.
DragKindpublishedIndicates the action performed for a drag operation: drag-and-drop or drag-and-dock.
DragModepublishedDetermines how a drag operation is started for the control.
EnabledpublishedDetermines whether the control responds to mouse or keyboard input.
FontpublishedThe font to be used for text display in this control.
OptionspublishedThe set of Options enabled for the tabbed control.
ParentBiDiModepublishedIndicates whether the BiDiMode settings in the Parent control are used.
ParentFontpublishedIndicates if the Font from the Parent control is used in the control.
ParentShowHintpublishedIf True, the value of ShowHint for the control will be the same as the one from the Parent. Default is True.
PopupMenupublishedA context-sensitive menu that pops up when the right mouse button is clicked over this control.
ShowHintpublishedEnables Hint display for the control.
TabOrderpublishedIndicates the navigation order for the control when the user presses the Tab or Shift+Tab key.
VisiblepublishedAllows the control, and all of its children, to be displayed or hidden.

Methods

WSRegisterClassprotectedRegisters the class type with the widgetset.
SetOptionsprotectedSets the value for the Options property.
AddRemovePageHandleprotectedNot implemented in TTabControl. Page handles are not used.
CanChangeprotectedIndicates whether the tab control can update its Tabs property.
CanShowTabprotectedIndicates if the control can show the tab at the specified position.
ChangeprotectedChanges the active tab for the control.
CreateWndprotectedCreates the Handle for the widgetset object and displays the selected tab and page.
DestroyHandleprotectedDestroys the handle for the control and all child controls.
DestroyWndprotectedFrees the handle for a Canvas allocated for the control.
NotificationprotectedHandles the notification when a component is added to or removed from the class instance.
SetDragModeprotectedSets the value for the DragMode property.
SetTabIndexprotectedSets the value for the TabIndex property.
UpdateTabImagesprotectedCalls the corresponding method in Tabs.
ImageListChangeprotectedCalls the corresponding method in Tabs.
DoSetBoundsprotectedUpdates the bounds for the control to the specified values.
GetControlClassDefaultSizeprotectedGets the default size for new instances of the class.
PaintWindowprotectedUpdates the canvas handle and paints the control.
PaintprotectedPaints the control to its Canvas using theme services.
AdjustDisplayRectWithBorderprotectedAdjust the specified display rectangle to use the size in Tabs.
AdjustClientRectprotectedCalls the AdjustDisplayRect method.
CreateTabNoteBookStringsprotectedCreates the TTabControlNoteBookStrings instance used in Tabs.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
IndexOfTabAtpublicGets the position for the tab at the specified mouse coordinates.
GetHitTestInfoAtpublicGets a set of hit test results for the specified mouse coordinates.
GetImageIndexpublicSignals the OnGetImageIndex event handler to get an image for the specified tab index.
IndexOfTabWithCaptionpublicGets the ordinal position for the tab with the specified Caption.
TabRectpublicGets the rectangle where the tab at the specified position is drawn.
RowCountpublicGets the number of rows needed to render the Tabs on the control.
ScrollTabspublicScrolls the tabs on the control horizontally by the value specified in Delta.
BeginUpdatepublicStarts an update process for the control.
EndUpdatepublicFinishes an update process for the control.
IsUpdatingpublicIndicates if there are unfinished updates for one of the Tabs on the control.

Events

OnChangepublishedEvent handler signalled when the active page (or tab) for the control is changed.
OnChangingpublishedEvent handler signalled prior to changing the active tab/page on the tabbed control.
OnGetImageIndexpublishedEvent handler signalled to get the image index for a tab on the tabbed control.
OnChangeBoundspublishedEvent handler signalled when the Bounds for the control have been changed.
OnContextPopuppublishedInvoked when a context-sensitive pop-up menu is requested.
OnDockDroppublishedEvent handler signalled for the drop of a control to be docked.
OnDockOverpublishedEvent handler signalled when a control is moved over a docksite; determines whether the drop event is accepted or rejected.
OnDragDroppublishedEvent handler signalled when an object is dropped onto the control.
OnDragOverpublishedEvent handler signalled when a control is dragged over the control instance.
OnEndDockpublishedEvent handler signalled for the end of a drag-dock operation.
OnEndDragpublishedEvent handler signalled for the end of a drag-drop operation.
OnEnterpublishedEvent handler signalled when the control receives focus.
OnExitpublishedEvent handler signalled when the control loses focus.
OnGetSiteInfopublishedProvides information about the DockSite for the control.
OnMouseDownpublishedEvent handler signalled when a mouse down event is handled for the control.
OnMouseEnterpublishedEvent handler signalled when the mouse pointer has entered the control.
OnMouseLeavepublishedEvent handler signalled when the mouse pointer has left the control.
OnMouseMovepublishedEvent handler signalled when the mouse pointer is moved in the control.
OnMouseUppublishedEvent handler signalled when a mouse up event is handled for the control.
OnMouseWheelpublishedEvent handler for mouse wheel turned.
OnMouseWheelDownpublishedEvent handler signalled for a downward movement of the mouse wheel.
OnMouseWheelUppublishedEvent handler signalled for an upward movement of the mouse wheel.
OnResizepublishedNotification handler for a resize of the control.
OnStartDockpublishedEvent handler for the start of a docking operation.
OnStartDragpublishedEvent handler signalled for the start of a dragging operation.
OnUnDockpublishedEvent 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.