Sign in Join
FPDoc Onlineexperiment

TPageControl class

In unit ComCtrls

Implements a multi-page component with a series of tabs.

Declaration

pascal
TPageControl = class(TCustomTabControl)

Inheritance

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

Descends from it: TNoteBookStringsTabControl

Description

TPageControl provides a series of tabs along an edge of a multi-page component to allow selection of one of the pages ( TTabSheet) defined for the component.

To use TPageControl, select its icon from the Common Controls tab of the IDE Component Palette and place it at the desired location on the Form.

Use the Form Designer and Object Inspector to adjust its shape, size, alignment, anchoring, docking and other properties, then select the object and right click with the mouse to bring up a pop-up menu whose first item is 'AddPage'. After you have added as many pages as you need, the individual pages can be edited by selecting ActivePage in the Object Inspector choosing the page required and editing its properties.

While a given page is selected, it is also possible to drop other controls (such as buttons, memo boxes etc) onto the page from the Component Palette.

Inherits most of its properties from TCustomTabControl

See also

Properties

ActivePageIndexpublicOrdinal position for the active page (tab sheet) on the page control.
PagespublicProvides indexed access to the pages (tab sheets) on the page control.
ActivePagepublishedThe currently selected and active page ( TTabSheet) on the page control.
AlignpublishedSpecifies the placement of the control on its Parent control.
AnchorspublishedThe set of anchor definitions for this control.
AutoSizepublishedAllows automatic adjustment of the size for the control, according to its content.
BorderSpacingpublishedDetermines the inner and outer border spacing for this control.
BiDiModepublishedIndicates whether text controls use in bi-directional reading.
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.
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.
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.
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.
ShowHintpublishedEnables Hint display for the control.
ShowTabspublishedEnables display of tabs on the control when set to True (default).
StylepublishedIndicates the appearance or display style used for the tabs on the control.
TabHeightpublishedHeight in pixels for the tabs on the control.
TabIndexpublishedContains the ordinal position for the active Tab in the control.
TabOrderpublishedIndicates the navigation order for the control when the user presses the Tab or Shift+Tab key.
TabPositionpublishedIndicates the edge where the tabs for the control are aligned.
TabStoppublishedAllows the user to navigate to / from the control by pressing the Tab or Shift+Tab keys.
TabWidthpublishedWidth in pixels for the tabs on the control.
VisiblepublishedAllows the control, and all of its children, to be displayed or hidden.

Methods

WSRegisterClassprotectedRegisters this component class with the current WidgetSet.
GetPageClassprotectedGets the class type used to create a new tab sheet (or page) for the page control.
DoAddDockClientprotectedDoAddDockClient creates a new tab sheet in the PageControl, places the client on it and aligns it.
DockOverprotectedCalled to check whether this control allows docking and where.
DoRemoveDockClientprotectedDoRemoveDockClient - frees the page which is being undocked.
DoUndockClientMsgprotectedNotifies the DockManager of the undock of a client control.
ChildClassAllowedprotectedDetermines whether the specified class can be a child control on the TPageControl instance.
UpdateDockCaptionprotectedUpdates page captions to reflect the captions for docked clients controls.
ClearpublicClears the list of tab names in the control, and frees the associated tab sheets or pages.
FindNextPagepublicGets the next tab sheet in the specified direction.
SelectNextPagepublicLocates and activates the next page in the specified direction.
IndexOfTabAtpublicReturns the ordinal position for the visible tab located at the specified client coordinates.
IndexOfPageAtpublicGets the ordinal position for the page object located at the specified client coordinates.
AddTabSheetpublicCreates and configures a new tab sheet for the page control.

Events

OnGetDockCaptionpublishedThis handler can provide a special DockCaption, different than the Caption default.
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.
OnCloseTabClickedpublishedEvent handler signalled when a tab is closed.
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.
OnGetImageIndexpublishedEvent handler signalled to get the image index for a tab on the tabbed control.
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 (48)

ActivePageComponent AddRemovePageHandle CanChange CanChangePageIndex Change CNNotify Create CreateWnd CustomPage Destroy DialogChar DisplayRect DoAutoAdjustLayout DoChange DoCloseTabClicked GetCapabilities GetControlClassDefaultSize GetImageIndex GetListClass GetMinimumTabHeight GetMinimumTabWidth GetPage GetPageCount IndexOf InitializeWnd InsertPage InternalSetPageIndex KeyDown Loaded MaybeSelectFirstControlOnPage MultiSelect Notification OwnerDraw Page PageCount PageIndex PageToTabIndex ReadState RemovePage SetOptions ShowControl SwitchingToPageIndex TabRect Tabs TabToPageIndex UpdateTabProperties WheelSelectPage WMSetFocus

From TWinControl (220)

AddControl AdjustClientRect AlignControls AllAutoSized AutoAdjustLayout AutoSizeDelayed AutoSizeDelayedHandle AutoSizeDelayedReport AutoSizePhases BeginUpdateBounds BorderStyle BorderWidth BoundsLockCount BroadCast Brush BrushCreated CachedClientHeight CachedClientWidth CalculatePreferredSize CanFocus CanSetFocus CanTab ChangeScale 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 DestroyHandle DestroyWnd DisableAlign DoAdjustClientRectChange DoAlignChildControls DoAllAutoSize DoAutoSize DoChildSizingChange DockClientCount DockClients DockDrop DockManager DoConstraintsChange DoDockClientMsg DoDockOver DoDragMsg DoEnter DoExit DoFlipChildren DoFloatMsg DoGetDockCaption DoKeyDownBeforeInterface DoKeyPress DoKeyUpBeforeInterface DoRemainingKeyDown DoRemainingKeyUp DoSendBoundsToInterface DoSendShowHideToInterface DoSetBounds DoubleBuffered DoUnDock 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 OnKeyDown OnKeyPress OnKeyUp OnUTF8KeyPress PaintControls PaintHandler PaintTo PaintWindow 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 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 (330)

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 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 OnChangeBounds 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 SetDragMode 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.