Group: Forum Members
Last Active: 13 Years Ago
Posts: 1,
Visits: 1
|
Hello,
I'd like to drag a shape and drop it somewhere else on a grid. In the moment I drop it, I'd like to check if it's permitted to drop it there. I think I should use the MouseUp event of the shape in the preview layer. Preview shape and original shape have the same uniqueID, that's how I get the original coordinates. But I don't know how to set the event for the preview shape.
NDrawingView1.PreviewLayer.FireEvents = True NDrawingDocument1.EventSinkService.Start() AddHandler NDrawingDocument1.EventSinkService.NodeMouseUp, AddressOf Me.handleMouseUp
With that code I receive events not only for the shapes, but for all MouseUps on the grid.
So, how can I access the preview shape to assign an eventhandler? Is it actually the right way? DragEnter and DragLeave events of the original shape themself, as I understood, are used for a different challenge.
|