FMX.Objects.TSelection.MouseDown

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

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

Properties

Type Visibility Source Unit Parent
procedure
function
public
FMX.Objects.pas
FMX.Objects.hpp
FMX.Objects TSelection

Description

Handles the pressing of a mouse button inside the TSelection object.

MouseDown calls FMX.Controls.TControl.MouseDown, checks whether any of the grip controls (small circles in the selection rectangular corners) are pointed to resize the selection shape and activate resizing by moving this control or activates moving of the TSelection object by moving the mouse pointer.

MouseDown has the following parameters:

  • Button--belongs to the TMouseButton type and specifies the pressed mouse button: mbLeft--left, mbRight--right, or mbMiddle--middle.
  • Shift--belongs to the TShiftState type and passes additional information such as: whether shift keys (ssShift--SHIFT, ssCtrl--CTRL, or ssAlt--ALT) were pressed when the mouse button was clicked; whether the mouse button was double-clicked (ssDouble).
  • X and Y--are the local pixel coordinates of the mouse pointer within the TSelection object.

The TForm form, owner of the TSelection object, calls MouseDown in response to mouse-down messages.

Override the public MouseDown method to provide a customized response when a mouse button is pressed when the mouse pointer is over the TSelection object.

See Also