GoDiagram Web Reference
CopyChildren Method (GoGroup)
Example 

Copy this group's children.
Syntax
'Declaration
 
Protected Overridable Sub CopyChildren( _
   ByVal newgroup As GoGroup, _
   ByVal env As GoCopyDictionary _
) 
protected virtual void CopyChildren( 
   GoGroup newgroup,
   GoCopyDictionary env
)

Parameters

newgroup
env
Remarks
This method is responsible for copying and adding this group's child objects to the newgroup. By default, this simply calls newgroup.Add(env.Copy(obj)) for each child obj. However, your group subclass may want to keep track of some or all of the children for its own purposes. To that end you can override this method to do the copying manually, thereby correctly maintaining your subclass's internal pointers to children. You probably should not be calling GoObject's GoObject.CopyObject, but GoCopyDictionary's Copy or indexed lookup instead.
Example
For example, a group holding an Icon, a Label, an InPort, and an OutPort might implement this method as follows: Note that this indexing use of GoCopyDictionary can handle null references--it returns null.
base.CopyChildren(newgroup, env);
MyNode newnode = (MyNode)newgroup;
newnode.myIcon = (GoObject)env[myIcon];
newnode.myLabel = (GoText)env[myLabel];
newnode.myInPort = (GoPort)env[myInPort];
newnode.myOutPort = (GoPort)env[myOutPort];
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

GoGroup Class
GoGroup Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback