TPageControl class
Implements a multi-page component with a series of tabs.
Declaration
TPageControl = class(TCustomTabControl)Inheritance
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
ActivePageIndex | public | Ordinal position for the active page (tab sheet) on the page control. |
Pages | public | Provides indexed access to the pages (tab sheets) on the page control. |
ActivePage | published | The currently selected and active page ( TTabSheet) on the page control. |
Align | published | Specifies the placement of the control on its Parent control. |
Anchors | published | The set of anchor definitions for this control. |
AutoSize | published | Allows automatic adjustment of the size for the control, according to its content. |
BorderSpacing | published | Determines the inner and outer border spacing for this control. |
BiDiMode | published | Indicates whether text controls use in bi-directional reading. |
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. |
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. |
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. |
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. |
ShowHint | published | Enables Hint display for the control. |
ShowTabs | published | Enables display of tabs on the control when set to True (default). |
Style | published | Indicates the appearance or display style used for the tabs on the control. |
TabHeight | published | Height in pixels for the tabs on the control. |
TabIndex | published | Contains the ordinal position for the active Tab in the control. |
TabOrder | published | Indicates the navigation order for the control when the user presses the Tab or Shift+Tab key. |
TabPosition | published | Indicates the edge where the tabs for the control are aligned. |
TabStop | published | Allows the user to navigate to / from the control by pressing the Tab or Shift+Tab keys. |
TabWidth | published | Width in pixels for the tabs on the control. |
Visible | published | Allows the control, and all of its children, to be displayed or hidden. |
Methods
WSRegisterClass | protected | Registers this component class with the current WidgetSet. |
GetPageClass | protected | Gets the class type used to create a new tab sheet (or page) for the page control. |
DoAddDockClient | protected | DoAddDockClient creates a new tab sheet in the PageControl, places the client on it and aligns it. |
DockOver | protected | Called to check whether this control allows docking and where. |
DoRemoveDockClient | protected | DoRemoveDockClient - frees the page which is being undocked. |
DoUndockClientMsg | protected | Notifies the DockManager of the undock of a client control. |
ChildClassAllowed | protected | Determines whether the specified class can be a child control on the TPageControl instance. |
UpdateDockCaption | protected | Updates page captions to reflect the captions for docked clients controls. |
Clear | public | Clears the list of tab names in the control, and frees the associated tab sheets or pages. |
FindNextPage | public | Gets the next tab sheet in the specified direction. |
SelectNextPage | public | Locates and activates the next page in the specified direction. |
IndexOfTabAt | public | Returns the ordinal position for the visible tab located at the specified client coordinates. |
IndexOfPageAt | public | Gets the ordinal position for the page object located at the specified client coordinates. |
AddTabSheet | public | Creates and configures a new tab sheet for the page control. |
Events
OnGetDockCaption | published | This handler can provide a special DockCaption, different than the Caption default. |
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. |
OnCloseTabClicked | published | Event handler signalled when a tab is closed. |
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. |
OnGetImageIndex | published | Event handler signalled to get the image index for a tab on the tabbed control. |
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 (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.
