Menu

#1 Add per-node ContextMenuStrip support

open
nobody
None
5
2006-07-12
2006-07-12
Sean Cier
No

This patch adds per-Node context menu support via a
scheme very similar to existing the tooltip support.

Because it replaces the ContextMenuStrip during every
MouseMove, it could be inefficient depending on the
Provider implementation; perhaps popping up the
ContextMenu on a right-mouse-click would be more
efficient -- but since the ContextMenuProvider can
cache ContextMenuStrips (especially if it's permitted
to assume only the latest ContextMenuStrip returned
from GetContextMenu needs to be valid, and so can
recycle small numbers of ContextMenuStrips or even a
single one), that need not be a concern. Hence I left
it this way for both clarity and to allow a best-case
implementation.

Discussion

  • Sean Cier

    Sean Cier - 2006-07-12

    Logged In: YES
    user_id=1115413

    Changed the patch to modify the context menu only on a right
    click instead of each mouse move. This removes the need to
    cache the ContextMenuStrips in the Provider, which was
    really more cumbersome than I'd thought. It actually ended
    up a bit cleaner too.

     
  • Sean Cier

    Sean Cier - 2006-07-12
     
  • Sean Cier

    Sean Cier - 2006-07-12

    Logged In: YES
    user_id=1115413

    Fixed malformed patch

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.