[Gambas-user] Drag and Drop Bug

Benoit Minisini gambas at ...1...
Tue Aug 8 21:58:53 CEST 2006


On Tuesday 08 August 2006 10:11, Timothy Marshal-Nichols wrote:
> Hello,
>
> The bug seems to be back where you can not cancel a drop event with STOP
> EVENT.
>
> After setting the property Drop to TRUE you should be able to drag items
> onto a control. If you use STOP EVENT in the _Drag() event this should
> cancel the _Drop() event. I have some code like this to cancel the _Drop()
> event:
>
> 	IconView1_Drag()
> 		IF Drag.Format <> myFormat THEN STOP EVENT
> 	END
>
> If you put this code in the Drag event you can see it is called. But it
> does not stop the _Drop() event being called. This example should always
> cancel the Drop event.
>
> 	IconView1_Drag()
> 		PRINT "Stop drag"
> 		STOP EVENT
> 	END
>
> I think there was this bug sometime in the past. And I thought it has been
> fixed. Looks like it has come back.
>
> I am sure the bug is in these controls:
>
> 	ListView
> 	IconView
> 	ListBox
>
> Possibly others.
>
> I am not in that much hurry to have this bug fixed. Just thought you might
> like to know and put it on your TO-DO list.
>
> Thanks
>
> 8-{)} Timothy Marshal-Nichols
> <mailto: timothy.marshal-nichols at ...247...>
>
>

This should be fixed in the next release.

The behaviour will be the following:

1) If you don't implement the Drag event handler, nor the DragMove event 
handler, then the drop is rejected.

2) If you implement the Drag event handler only, then the drop is rejected 
only if you use STOP EVENT.

3) If you implement the DragMove event handler only, then the drop is rejected 
only if you use STOP EVENT.

4) If you implement both Drag and DragMove event handlers, then the drop is 
rejected if you use STOP EVENT in both handlers.

Regards,

-- 
Benoit Minisini





More information about the User mailing list