TreeView missing QueryContinue..Event


G

Guest

I am trying to get a QueryContinueDragEvent per the MSDN tutorial on
Drag&Drop from a TreeView control.
My TreeView is at the same time source and destination (basically I am
trying to manually rearrange nodes). I try to abort the D&D when outside the
main form but I can not get the Query.. Event to fire; any ideas what's can
be wrong?

I've already installed handlers/subscribes for most (Ithink) related events
but no luck so far...

Thanks ahead!

TB
 
Ad

Advertisements

S

Stoitcho Goutsev \(100\)

tb2000,
QueryContinueDrag is fired on the source side only when the state of the
mouse or keyboard buttons is changed. It is not fired while the mouse just
moves around. There is no drag&drop event that you can use to cancel
operation when the mouse leaves the boundaries of a control. The operation
can be canceled only when the user presses/releases keyboard key or mouse
button. On the other side the target decides whether it understands the
dragged data and the drop is allowed.
 
G

Guest

Stoitcho, thanks. I just found the bug; I had the eventhandler registered to
the parent class (this.Query.... instead of treeView.Query....).

However there is an example on MSDN how to abort drag ops e.g. when moving
outside a window - you do this by passing the cancel command back in the
EventArgs of exactly the query event.

And in my case I am now getting the event just by moving the mouse.

Well, and anyways thanx again!
Theo
 
Ad

Advertisements

G

Guest

Shouldn't the QueryContinueDrag fire when the mouse button is released even
if the current effect is None? It doesn't seem to be firing for me so the
drag operation is over but my code doesn't know it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top