[Gambas-user] R: "Strange" coordinates of mouse with _Drop() event
Benoît Minisini
gambas at ...1...
Tue Oct 22 01:39:08 CEST 2013
Le 22/10/2013 01:12, Ru Vuott a écrit :
> Hello Benoît,
>
> well, at this time we are also discussing this issue in the forum of
> the Italian community of programmers Gambas .
>
> I am attaching a simple application . I would like to point out that
> when you start to drag the image to be dredged, also the X and Y
> coordinates of the mouse pointer - relative to the object (in the
> example of the application attached it is a "PictureBox" ) that
> contains the image to drag - are stored.
>
> Then , when the release occurs , and therefore is raised the event of
> _Drop( ) inside another container (in the example of the attached
> application it is a "ScrollView" ) , the dragged object is not
> released to the coordinates in which the mouse pointer is located at
> the time, but to the coordinates previously stored when dragging
> begins !!!
>
> So the object is released in the other container (the ScrollView) to
> the coordinates "where" the mouse was clicked (inside of the
> PictureBox), when dragging of the image is started.
>
> And more, I known however a slight displacement of the coordinate
> values at the time of the event of _Drop( ) compared to those
> stored in the time of initiation of the drag , and for the accuracy :
> X - 8 and Y + 2.
>
> I hope I have been clear enough. :-(
>
> Best regards vuotttt
>
You must use Drag.X and Drag.Y to get the coordinates of the drop, not
Mouse.X and Mouse.Y that have no good meaning inside a drop event.
Regards,
--
Benoît Minisini
More information about the User
mailing list