Difference between revisions of "MouseDrag event"

From Xojo Documentation

m
 
Line 9: Line 9:
 
|text = This event fires continuously after the mouse button was pressed inside the [[Control]]. Mouse location is local to the control passed in to ''x'', ''y''. }}
 
|text = This event fires continuously after the mouse button was pressed inside the [[Control]]. Mouse location is local to the control passed in to ''x'', ''y''. }}
  
 +
==Notes==
 
{{Information|This event will not occur unless you return [[True]] in the [[MouseDown event]] first.}}
 
{{Information|This event will not occur unless you return [[True]] in the [[MouseDown event]] first.}}
 
 
==Notes==
 
  
 
The parameters ''x'' and ''y'' are local coordinates, i.e. they represent the position of the mouse relative to the upper-left corner of the [[Control]].
 
The parameters ''x'' and ''y'' are local coordinates, i.e. they represent the position of the mouse relative to the upper-left corner of the [[Control]].
Line 18: Line 16:
 
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the mouse has really moved.
 
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the mouse has really moved.
  
== Controls implementing the MouseDrag event ==
+
=== Controls implementing the MouseDrag event ===
 
* [[Canvas]]
 
* [[Canvas]]
 
* [[GroupBox]]
 
* [[GroupBox]]

Latest revision as of 20:43, 22 January 2019

Event


(See Below).MouseDrag(x as Integer, y as Integer)

Supported for all project types and targets.

This event fires continuously after the mouse button was pressed inside the Control. Mouse location is local to the control passed in to x, y.

Notes

fa-info-circle-32.png
This event will not occur unless you return True in the MouseDown event first.

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

As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the mouse has really moved.

Controls implementing the MouseDrag event