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

TControl.DoMouseDown

Performs actions needed to handle a mouse down event for the control.

Declaration

Source position: controls.pp line 1495

protected procedure TControl.DoMouseDown(

  var Message: TLMMouse;

  Button: TMouseButton;

  Shift: TShiftState

); virtual;

Arguments

Message

  

Mouse message examined and handled in the method.

Button

  

Mouse button for the message.

Shift

  

Ctrl, Shift, or Alt modifier for the mouse button event.

Description

DoMouseDown is a virtual method used to apply the mouse button down event in the Message and Button arguments. DoMouseDown checks the control style flags in ControlStyle to determine whether the control responds to standard mouse events.

No actions are performed in the method when csNoStdEvents has been included in ControlStyle. This indicates that mouse events are handled by the widgetset class instance for the control.

Otherwise, values in Message and Button are applied in the method. The mouse coordinates in Message are converted to screen coordinates, and the message is applied by calling the MouseDown method.

DoMouseDown is called from methods like: WMLButtonDown, WMRButtonDown, WMMButtonDown, and WMXButtonDown.

See also

TControl.ControlStyle

  

Contains style flags which control the features or behaviors enabled for the control.

TControl.MouseDown

  

Handles a mouse down event for the control.

TControl.OnMouseDown

  

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

TControl.WMLButtonDown

  

Handles a LM_LBUTTONDOWN (left mouse button down) message for the control.

TControl.WMRButtonDown

  

Handles a LM_RBUTTONDOWN (right mouse button down) message for the control.

TControl.WMMButtonDown

  

Handles a LM_MBUTTONDOWN (middle mouse button down) message for the control.

TControl.WMXButtonDown

  

Handles a LM_XBUTTONDOWN (extra mouse button down) message for the control.


Version 3.2 Generated 2024-02-25 Home