Vcl.ComCtrls.TToolButton.MouseDown

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

C++

DYNAMIC void __fastcall MouseDown(System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TToolButton

Description

Responds when the user clicks the button with the mouse.

Do not call MouseDown. It is called automatically when the user clicks the tool button with the mouse. As implemented in TToolButton, MouseDown first toggles the Down property if the button's style is tbsDropDown and the user clicked the left mouse button. Then it generates an OnMouseDown event.

The Button parameter determines which mouse button the user pressed.

Shift indicates which shift keys (Shift, Ctrl, or Alt) were down when the user pressed the mouse button.

X and Y are the pixel coordinates of the mouse pointer within the client area of the control.

MouseDown helps ensure that the tool button's behavior remains unchanged, regardless of the version of ComCtl32.dll that is installed on the users system.

See Also