GoDiagram Web Reference
GoContextMenu Class
Members  Example 

GoContextMenu is just a data structure that provides an easy way to implement dynamically constructed client-side popup menus that either invoke an event handler of your GoObject class on the server or execute JavaScript on the client.
Syntax
'Declaration
 
<SerializableAttribute()>
Public Class GoContextMenu 
   Inherits GoMenu
[SerializableAttribute()]
public class GoContextMenu : GoMenu 
Remarks
GoContextMenu is very similar to the System.Windows.Forms.ContextMenu class, in particular to the subset implemented in the .NET Compact Framework.
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
   Northwoods.GoWeb.GoMenu
      Northwoods.GoWeb.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.GoWeb Namespace

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback