GoDiagram Win Reference
GoContextMenu Class
Members  Example 

GoContextMenu is just a ContextMenu that provides an easy way to get the GoView in which a context menu MenuItem.Click event handler was invoked.
Syntax
'Declaration
 
<ToolboxItemAttribute(ToolboxItemType=, ToolboxItemTypeName="")>
<DesignTimeVisibleAttribute()>
Public Class GoContextMenu 
   Inherits System.Windows.Forms.ContextMenu
[ToolboxItemAttribute(ToolboxItemType=, ToolboxItemTypeName="")]
[DesignTimeVisibleAttribute()]
public class GoContextMenu : System.Windows.Forms.ContextMenu 
Example
Adding a context menu to a particular node class:
public override GoContextMenu GetContextMenu(GoView view) {
  GoContextMenu cm = new GoContextMenu(view);
  cm.MenuItems.Add(new MenuItem("Copy", new EventHandler(this.Copy_Command)));
  return cm;
}
private void Copy_Command(Object sender, EventArgs e) {
  GoView v = GoContextMenu.FindView(sender as MenuItem);
  if (v != null)
    v.EditCopy();
}
Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Windows.Forms.Menu
            System.Windows.Forms.ContextMenu
               Northwoods.Go.GoContextMenu

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoContextMenu Members
Northwoods.Go Namespace

 

 


© 2015. Northwoods Software Corporation. All Rights Reserved.

Send Feedback