Changing the cursor of a tool


#1

How is it possible to change the default cursor of a tool (predefined or custom) to a custom cursor?
I mean, when the tool starts I would like it to use a certain custom cursor and when it stops it should go back to the default cursor (default tool cursor?)
Thanks
Yuval Naveh


#2

Sorry, but I should have been more specific.
Changing a cursor of a custom tool (Inherites directly from GoTool) is not a problem. I have seen an example in Demo1 - PolygonDrawingTool class.
I actually wanted to changed the cursor of the predefined (built in) dragging tool. I could not do it because it seems that Start() method of GoToolDragging changes the cursor inside, and since it probably start DoDragDrop() inside the code does not return until drag&drop is finished, so I cannot override the cursor in the next line…
Is there a workaround? One workaround is to rewrite GoToolDragging - something I’d rather avoid!
Yuval


#3

Actually, GoDiagram does not control the cursor during a drag-and-drop. It’s Windows that does that.
I think there’s a way of doing that, but it doesn’t have anything to do with GoDiagram. I can’t recall it off hand; maybe I’ll remember at another time.
—Walter


#4

I managed to change the cursors through overriding OnGiveFeedback of the view.
Thanks
Yuval


#5

How you do that. Please expain.