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

TPageControl

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

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

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;

  

Returns True if the specified class is allowed in child controls.

public

  procedure Clear;

  

Clears the list of tab names of the control, and causes the associated tab sheets or pages to be freed.

  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 inside its Parent.

  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;

  

Customization (of text controls) in bidirectional reading environments.

  property Constraints: TSizeConstraints;

  

The minimum and maximum Width and Height for the control.

  property DockSite: Boolean;

  

Allows controls to be drag-dock'd 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 reacts on 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;

  

Allows to use the BiDiMode settings in the Parent control. Default is true.

  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 the Hint display.

  property ShowTabs: Boolean;

  

ShowTabs - if True (default condition), show the tabs for each page.

  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;

  

Determines the sequence of control navigation when the user presses the Tab key.

  property TabPosition: TTabPosition;

  

TabPosition - top, bottom, left or right.

  property TabStop: Boolean;

  

Allows the user to navigate to this control, by pressing the Tab key.

  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 dragging operation.

  property OnEnter: TNotifyEvent;

  

Handler for control receiving the focus.

  property OnExit: TNotifyEvent;

  

Handler for control loosing 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 for mouse button going down.

  property OnMouseEnter: TNotifyEvent;

  

Event handler for mouse entering the area of the control.

  property OnMouseLeave: TNotifyEvent;

  

Event handler for mouse leaving the area of the control.

  property OnMouseMove: TMouseMoveEvent;

  

Event handler for mouse movement within the control.

  property OnMouseUp: TMouseEvent;

  

Event handler for mouse button going up.

  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 for control being undocked from this DockSite.

  property Options: TCTabControlOptions;

  

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

end;

Inheritance

TPageControl

  

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

|

TCustomTabControl

  

Implements the base class for tabbed controls in the LCL.

|

TWinControl

  

The base class for controls 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.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.