Unit 'ComCtrls' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#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 3966

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 in the control.

  procedure Loaded; override;

  

Performs actions when a component has been loaded during LCL 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;

  

SectionEndDrag - method for emulating the OnSectionEndDrag event.

  function SectionDrag(); virtual;

  

SectionDrag - method to emulate the OnSectionDrag event.

  procedure MouseEnter; override;

  

Invokes the OnMouseEnter handler.

  procedure MouseLeave; override;

  

Invokes the OnMouseLeave handler.

  procedure MouseDown(); override;

  

Handler for MouseDown events.

  procedure MouseMove(); override;

  

Handler for MouseMove events.

  procedure MouseUp(); override;

  

Invokes the OnMouseUp handler.

  procedure UpdateState;

  

UpdateState - bring the state of the control up-to-date.

  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]

  

SectionFromOriginalIndex - the section as defined by the original (unchanged) index.

  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]

  

DragReorder - find out if the sections are allowed to be re-ordered by dragging.

  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]

  

OnSectionDrag - event handler for dragging the section of header.

  property OnSectionEndDrag: TNotifyEvent; [rw]

  

OnSectionEndDrag - event handler for ending the drag process for this section.

  property OnSectionClick: TCustomSectionNotifyEvent; [rw]

  

OnSectionClick - event handler for mouse click on this section of header.

  property OnSectionResize: TCustomSectionNotifyEvent; [rw]

  

OnSectionResize - event handler for re-sizing this section of the header.

  property OnSectionTrack: TCustomSectionTrackEvent; [rw]

  

OnSectionTrack - event handler for tracking this section.

  property OnSectionSeparatorDblClick: TCustomSectionNotifyEvent; [rw]

  

OnSectionSeparatorDblClick - event handler for double-click on the separator between sections.

  property OnCreateSectionClass: TCustomHCCreateSectionClassEvent; [rw]

  

OnCreateSectionClass - event handler for creating a new section class.

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.

|

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.