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

TCustomHeaderControl

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

TCustomHeaderControl - base class for THeaderControl, a header strip of user-designed sections which allow selection of pages or actions.

Declaration

Source position: comctrls.pp line 4007

type TCustomHeaderControl = class(TCustomControl)

protected

  function CreateSection; virtual;

  

Creates a new header section for the control.

  function CreateSections; virtual;

  

Creates the collection used to store header sections defined for the control.

  procedure Loaded; override;

  

Performs actions when the component has been loaded during LCL component streaming.

  procedure Notification(); override;

  

Handles the notification when a component is added to or removed from the class instance.

  procedure SectionClick(); virtual;

  

Performs actions needed when the mouse is clicked on the specified header section.

  procedure SectionResize(); virtual;

  

Performs actions needed to resize the specified header section.

  procedure SectionTrack(); virtual;

  

Performs actions needed when the mouse tracking state for a header section has changed.

  procedure SectionSeparatorDblClick(); virtual;

  

Performs actions to handle a mouse double click event for the specified header section.

  procedure SectionEndDrag; virtual;

  

Signals the OnSectionEndDrag event handler (when assigned).

  function SectionDrag(); virtual;

  

Signals the OnSectionDrag event handler (when assigned and enabled).

  procedure MouseEnter; override;

  

Signals the OnMouseEnter event handler (when assigned).

  procedure MouseLeave; override;

  

Signals the OnMouseLeave event handler (when assigned).

  procedure MouseDown(); override;

  

Handles a mouse down event for the control.

  procedure MouseMove(); override;

  

Handler for MouseMove events.

  procedure MouseUp(); override;

  

Signals the OnMouseUp handler.

  procedure UpdateState;

  

Updates the State property in one or more of the Sections on the header control.

  class function GetControlClassDefaultSize; override;

  

Gets the default size for new instances of the class.

  procedure DoAutoAdjustLayout(); override;

  

Applies an automatic layout policy to the control using the specified scaling factors.

public

  property SectionFromOriginalIndex []: THeaderSection; [r]

  

Gets a header section by its original position in the Sections collection.

  constructor Create(); override;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  procedure Click; override;

  

Signals OnClick and/or executes the ActionLink when the control has been clicked.

  procedure DblClick; override;

  

Signals the OnDblClick event handler (when assigned).

  function GetSectionAt();

  

Gets the header section at the position specified in P.

  procedure Paint; override;

  

Draws the control to its Canvas using highlighting, drag images, and theme details.

  procedure PaintSection(); virtual;

  

Paints the specified header section to the Canvas for the control.

  procedure ChangeScale(); override;

  

Scales the width of the header sections in the control using the specified multiplier and divisor.

published

  property DragReorder: Boolean; [rw]

  

Enables or disables reordering of header sections on the control using drag and drop.

  property Images: TCustomImageList; [rw]

  

Contains bitmaps displayed on the header sections for the control.

  property ImagesWidth: Integer; [rw]

  

Specifies the width for Images displayed in the header control.

  property Sections: THeaderSections; [rw]

  

Sections - the short segments of the header separated by vertical bars that function as the elementary selection units of the header.

  property OnSectionDrag: TSectionDragEvent; [rw]

  

Event handler signalled to determine whether a header section can be dragged and dropped at a new position on the control.

  property OnSectionEndDrag: TNotifyEvent; [rw]

  

Event handler signalled when a drag and drop operation for a section is completed.

  property OnSectionClick: TCustomSectionNotifyEvent; [rw]

  

Event handler signalled when a mouse click event occurs in a section header on the control.

  property OnSectionResize: TCustomSectionNotifyEvent; [rw]

  

Event handler signalled when a resize operation for a header section has been completed.

  property OnSectionTrack: TCustomSectionTrackEvent; [rw]

  

Event handler signalled when drag tracking/resizing is activated for the selected header section on the control.

  property OnSectionSeparatorDblClick: TCustomSectionNotifyEvent; [rw]

  

Event handler signalled when a separator between header sections on the control is double-clicked.

  property OnCreateSectionClass: TCustomHCCreateSectionClassEvent; [rw]

  

Event handler signalled to get the class type used to create a new section for the header control.

end;

Inheritance

TCustomHeaderControl

  

TCustomHeaderControl - base class for THeaderControl, a header strip of user-designed sections which allow selection of pages or actions.

|

TCustomControl

  

The base class for windowed controls which paint themselves.

|

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,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject

Description

TCustomHeaderControl - base class for THeaderControl, a header strip of user-designed sections which allow selection of pages or actions.

THeaderControl offers a widget that could be placed along the edge of a Panel or Form allowing a highly customized mechanism for selection. However, there are no intrinsically associated display areas and it is the developer's responsibility to supply an index associated with the selection from the THeaderControl and determining what action is to occur or what is to be displayed in any attached Panel or Form.

See also

Using Multi-Page Controls

  

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


Version 3.2 Generated 2024-02-25 Home