Profile Picture

Temporarily change the cursor in a diagram

Posted By Douglas Earl 14 Years Ago
Author
Message
Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Doug,

In Nevron Diagram the cursors and tooltips is consistently managed by an instance of the NInteractivityManager an instance of which can be obtained by the InteractivityManager property of each view. Views (both drawing and library ones) are updating the cursor/tooltip on each mouse move.

The cursor /tooltip requests are enclosed in calls to StartCursorAndTooltipRequests and EndCursorAndTooltipRequests where the latter updates the cursor/tooltip with the latest cursor/tooltip set by the RequestCursor/RequestTooltip methods.

So to temporary gain full control over the cursor you must override the RequestCursor method and call the base implementation with the cursor that you currently want:

public override void RequestCursor(Cursor cursor)
{
if(overrideCursor)
{
base.RequestCursor(MyCursor);
}
else
{
base.RequestCursor(cursor);
}
}

Hope this helps - questions or comments - please feel free...

Best Regards,
Nevron Support Team



Douglas Earl
questionmark Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 15, Visits: 1

Hi,

Is it possible to temporarily change the cursor without setting shape.InteractivityStyle?  (I don't want to use that because it generates an undoable event and my app thinks the diagram is modified).  I've tried setting NDrawingView.Cursor and Cursor.Current without success.

Thanks,

Doug





Similar Topics


Reading This Topic