Custom cursor on mouse hover over GoNode

Hi,
I have customized GoNode objects on the view and would like to show
special cursor (ex: “SizeAll”) whenever user hovers mouse on them.
What I have done is the following:
public class CustomNode : GoNode
{
string cursorName = “Normal”;
public override string GetCursorName(GoView view)
{
return cursorName;
}
public override bool OnHover(GoInputEventArgs evt, GoView view)
{
cursorName = “SizeAll”;
return base.OnHover(evt, view);
}

// overriding for resetting cursor to normal, otherwise cursor will be set to "SizeAll" forever

public override bool OnEnterLeave(GoObject from, GoObject to, GoView view)
{
if (from == this)
{
cursorName = "Normal";
}
return base.OnEnterLeave(from, to, view);
}
} Is this the right way to get custom cursor on mouse hover over GoNode? Thanks/-

Just reading the code, it looks like you have to wiggle the mouse (to generate a mouse move) after the OnHover fires to get the cursor to change. Is that right?



If it is, you should also set the View.CursorName when you hit the OnHover. You shouldn’t have to change the View.Cursorname back in the Leave.