After upgrading to 2019 R2 build 2328 (32 bit) our users noted that dragging within treeviews using the right mouse button no longer is possible.
The treeview controls have the Dragauto property set and DisableDragAndDrop unchecked.
When dragging with the left button, BeginDrag and DragDrop events are triggered as expected, upon inital press/move left button and upon release left button.
When dragging with the right button, BeginRightDrag is triggered as dragging starts, but a DragDrop event is never triggered when the mouse button is released.
I have traced this behaviour in two widely different treeview controls in different dialogs.
We use the two dragging modes for performing different operations, so it would be nice if anyone knows a workaround. Maybe the Dragdrop event may be activated again in the BeginRightDrag event code?
Yes, that worked. I found a nice ammendment that will continue to work even when the bug becomes fixed in future builds.
In the rbuttonup event, which is supposed to fire after the dragdrop event, I simply added these lines:
if ii_mousebutton = 2 Then
// bug in right button dragging: no dragdrop event is produced before rbuttonup event
// If a future fix is provided, ii_mousebutton will already be 0 and prevent repeated execution
// execute dragdrop functions:
event dragdrop(this, il_handle_source) // includes setting ii_mousebutton = 0
// cancel dragging
this.drag(cancel!)
End If