MouseDown event

From Xojo Documentation

Revision as of 19:21, 24 May 2013 by PLefebvre (talk | contribs)
Event


<see below>.MouseDown(x as Integer, y as Integer) As Boolean

Supported for all project types and targets.

The mouse button was pressed inside the control’s region at the location passed in to x, y.

Notes

The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative to the upper-left corner or the Control.

Return True if you are going to handle the MouseDown. In such a case:

  • The Action event, if any, will not execute and the state of the object will not change.
  • You will receive the MouseDrag and MouseUp events.

Example

The MouseDown event uses the DragItem constructor when the user drags the contents of the control. It is:

Dim d as DragItem
d=New DragItem(Self,Me.left,Me.top,Me.width,Me.height)
d.picture=Me.Image
d.Drag //Allow the drag

Controls implementing the MouseDown event

See Also

DragItem.