[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'ComCtrls' (#lcl)

TPageControl

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

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

Declaration

Source position: comctrls.pp line 573

type TPageControl = class(TCustomTabControl)

protected

  class procedure WSRegisterClass; override;

  

Registers this component class with the current WidgetSet.

  function GetPageClass; override;

  

Gets the class type used to create a new tabsheet (or page) for the page control.

  procedure DoAddDockClient(); override;

  

DoAddDockClient creates a new TabSheet in the PageControl, places the client on it and aligns it.

  procedure DockOver(); override;

  

Called to check whether this control allows docking and where.

  procedure DoRemoveDockClient(); override;

  

DoRemoveDockClient - frees the page which is being undocked.

  function DoUndockClientMsg(); override;

  

Notifies the DockManager of the undock of a client control.

  function ChildClassAllowed(); override;

  

Checks whether the specified class type is allowed as a child control.

public

  procedure Clear;

  

Clears the list of tab names in the control, and frees the associated tab sheets or pages.

  function FindNextPage();

  

FindNextPage - returns the next page (TTabSheet) in the sequence.

  procedure SelectNextPage();

  

SelectNextPage - checking that its tab is visible.

  function IndexOfTabAt();

  

IndexOfTabAt returns the index value for the Tab located at the specified client coordinates.

  function IndexOfPageAt();

  

Gets the index for the page at the specified client coordinates.

  function AddTabSheet;

  

Convenience routine used to make the TPageControl more intuitive to use.

  property ActivePageIndex: Integer; [rw]

  

ActivePageIndex - index value of currently selected (active) page.

  property Pages []: TTabSheet; [r]

  

Pages - the actual Pages (TTabSheet) that comprise the component.

published

  property ActivePage: TTabSheet; [rw]

  

ActivePage - the currently selected active page (TTabSheet).

  property OnGetDockCaption: TGetDockCaptionEvent;

  

This handler can provide a special DockCaption, different than the Caption default.

  property Align: TAlign;

  

Specifies the placement of the control on its Parent control.

  property Anchors: TAnchors;

  

The set of anchor definitions for this control.

  property AutoSize: Boolean;

  

Allows automatic adjustment of the size for the control, according to its content.

  property BorderSpacing: TControlBorderSpacing;

  

Determines the inner and outer border spacing for this control.

  property BiDiMode: TBiDiMode;

  

Indicates whether text controls use in bi-directional reading.

  property Constraints: TSizeConstraints;

  

Contains the minimum and maximum Width and Height for the control.

  property DockSite: Boolean;

  

Allows controls to be drag-dock-ed into this control.

  property DragCursor: TCursor;

  

The cursor shape shown while the control is dragged.

  property DragKind: TDragKind;

  

The operation when the control is dragged - Drag or Dock.

  property DragMode: TDragMode;

  

Allows the user to drag the control.

  property Enabled: Boolean;

  

Determines whether the control responds to mouse or keyboard input.

  property Font: TFont;

  

The font to be used for text display in this control.

  property HotTrack: Boolean;

  

HotTrack - the property whereby the item under the mouse pointer becomes emphasized.

  property Images: TCustomImageList;

  

Images - the list of images associated with the pages of this notebook.

  property ImagesWidth: Integer;

  

Width for the Images used in the control.

  property MultiLine: Boolean;

  

MultiLine - whether the Tab's caption is allowed to have multiple lines.

  property ParentBiDiMode: Boolean;

  

Indicates whether the BiDiMode settings in the Parent control are used.

  property ParentFont: Boolean;

  

If True, the Font of the control will be the same as the one from the Parent. Default is True.

  property ParentShowHint: Boolean;

  

If True, the value of ShowHint for the control will be the same as the one from the Parent. Default is True.

  property PopupMenu: TPopupMenu;

  

A context-sensitive menu that pops up when the right mouse button is clicked over this control.

  property RaggedRight: Boolean;

  

RaggedRight - un-justified or un-aligned text.

  property ScrollOpposite: Boolean;

  

ScrollOpposite - is scrolling to happen in the opposite direction to usual?

  property ShowHint: Boolean;

  

Enables Hint display for the control.

  property ShowTabs: Boolean;

  

Shows the tabs for each page when set to True (default).

  property Style: TTabStyle;

  

Style - Tabs, buttons or flat buttons?

  property TabHeight: SmallInt;

  

TabHeight - height of the tabs.

  property TabIndex: Integer;

  

Contains the ordinal position for the active Tab in the control.

  property TabOrder: TTabOrder;

  

Indicates the navigation order for the control when the user presses the Tab or Shift+Tab key.

  property TabPosition: TTabPosition;

  

TabPosition - top, bottom, left or right.

  property TabStop: Boolean;

  

Allows the user to navigate to / from the control by pressing the Tab or Shift+Tab keys.

  property TabWidth: SmallInt;

  

Width of the tabs displayed on the control.

  property Visible: Boolean;

  

Allows the control, and all of its children, to be displayed or hidden.

  property OnChange: TNotifyEvent;

  

OnChange - Occurs immediately after a tab is selected.

  property OnChanging: TTabChangingEvent;

  

OnChanging - event handler for changing a tab.

  property OnCloseTabClicked: TNotifyEvent;

  

OnCloseTabClicked - event handler for clicking on the Close button to close a tab.

  property OnContextPopup: TContextPopupEvent;

  

Invoked when a context-sensitive pop-up menu is requested.

  property OnDockDrop: TDockDropEvent;

  

Notification handler for the drop of a control to be docked.

  property OnDockOver: TDockOverEvent;

  

Event handler for moves of a control over this docksite; determines acceptance or rejection of an possible drop.

  property OnDragDrop: TDragDropEvent;

  

This handler determines the action on an drop onto this control, in a drag-drop operation.

  property OnDragOver: TDragOverEvent;

  

Event handler for a control being dragged over this control.

  property OnEndDock: TEndDragEvent;

  

Notification handler for the end of a docking operation.

  property OnEndDrag: TEndDragEvent;

  

Notification handler for the end of a drag operation.

  property OnEnter: TNotifyEvent;

  

Handler for control receiving the focus.

  property OnExit: TNotifyEvent;

  

Handler for control losing the focus; This is a good place for checking the finished user input.

  property OnGetImageIndex: TTabGetImageEvent;

  

OnGetImageIndex - event handler for getting an image index.

  property OnGetSiteInfo: TGetSiteInfoEvent;

  

Provides information about the DockSite for the control.

  property OnMouseDown: TMouseEvent;

  

Event handler signalled when a mouse down event is handled for the control.

  property OnMouseEnter: TNotifyEvent;

  

Event handler signalled when the mouse pointer has entered the control.

  property OnMouseLeave: TNotifyEvent;

  

Event handler signalled when the mouse pointer has left the control.

  property OnMouseMove: TMouseMoveEvent;

  

Event handler for mouse movement within the control.

  property OnMouseUp: TMouseEvent;

  

Event handler signalled when a mouse up event is handled for the control.

  property OnMouseWheel: TMouseWheelEvent;

  

Event handler for mouse wheel turned.

  property OnMouseWheelDown: TMouseWheelUpDownEvent;

  

Event handler for downward movement of mouse wheel.

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  

Event handler for upward movement of the mouse wheel.

  property OnResize: TNotifyEvent;

  

Notification handler for a resize of the control.

  property OnStartDock: TStartDockEvent;

  

Event handler for the start of a docking operation.

  property OnStartDrag: TStartDragEvent;

  

Event handler for the start of a dragging operation.

  property OnUnDock: TUnDockEvent;

  

Event handler signalled before a control is undocked from its DockSite.

  property Options: TCTabControlOptions;

  

The set of Options for the Notebook: Show close buttons on the tabs, multi-line tabs.

end;

Inheritance

TPageControl

  

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

|

TCustomTabControl

  

Implements the base class for tabbed controls in the LCL.

|

TWinControl

  

Implements a windowed control which can contain other child controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components which have an associated widget.

|

TComponent

?

TObject

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) on to the page from the Component Palette.

Inherits most of its properties from TCustomTabControl

See also

Using Multi-Page Controls

  

MultiPageControls - controls that offer a selection of alternative pages for display.