Unit 'ComCtrls' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#lcl]

TCustomHeaderControl.UpdateState

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

Declaration

Source position: comctrls.pp line 4076

protected procedure TCustomHeaderControl.UpdateState;

Description

UpdateState is a method used to update the drawing state for one or more of the Sections on the header control. When Enabled is set to True, it ensures that the selected section on the control has its State property set to the Up (hsNormal) or Down (hsPressed) drawing style as required. If a mouse down event has not reported for the control, the section under the mouse pointer is updated to use hsHot in its State property.

UpdateState visits each of the THeaderSection instances in Sections, and sets their State property to hsNormal if it is not the selected or highlighted section on the control.

UpdateState is called from the MouseEnter and MouseLeave methods when the control gains or loses mouse capture for the control. It is also called from MouseDown, MouseMove, and MouseUp when mouse events are handled for the control.

See also

TCustomHeaderControl.Sections

  

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

TCustomHeaderControl.MouseEnter

  

Signals the OnMouseEnter event handler (when assigned).

TCustomHeaderControl.MouseLeave

  

Signals the OnMouseLeave event handler (when assigned).

TCustomHeaderControl.MouseMove

  

Handler for MouseMove events.

TCustomHeaderControl.MouseDown

  

Handles a mouse down event for the control.

TCustomHeaderControl.MouseUp

  

Signals the OnMouseUp handler.

THeaderSection.State

  

State - whether normal, hot (i.e. mouse hovers over it ready to be selected) or pressed (selected).

THeaderSectionState

  

Enumerated type which represents selection states for THeaderSection.

TControl.Enabled

  

Determines whether the control responds to mouse or keyboard input.



CT Web help

CodeTyphon Studio