Temporarily change the cursor in a diagram


Author
Message
Douglas Earl
Douglas Earl
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
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


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search