Drag Drop using Menus

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a sitiuation in which I need to initiate a drag operation on a grid
based on a menu click or button click.

For example, the user right clicks on the grid and a context menu is shown.
One of the menu's is called "Move". If the user clicks on the Move menu item,
the grid should initiate the drag procedure.

I call the Grid.DoDragDrop(...) on the click of the menu, but as "Click"
means mouse down and then mouse up, the drag operation gets "cancelled" and
immediately after the call to Grid.DoDragDrop(), the Grid's DragDrop event is
called - meaning that the Drag operation is over.

Is this any intutive way to accomplish this i.e. initiate Drag from a menu?
 
I believe that when the mouse button is release during a DragDrop, it
will raise a QueryContinueDrag event. That event has a Action property
that you can set to indicate whether to continue the drag or not.

Hope this helps
 
Yes, it fires the QueryContinueDrag event, but even after setting the Action
property to Continue, the application / system calls the DragDrop event on
the target as the mouse button is no longer in the "down" state
 
Back
Top