GoDiagram Web Reference
CreateShape Method
Example 

the GoPort created for this node by CreatePort
Create and initialize a GoShape.
Syntax
'Declaration
 
Protected Overridable Function CreateShape( _
   ByVal p As GoPort _
) As GoShape
protected virtual GoShape CreateShape( 
   GoPort p
)

Parameters

p
the GoPort created for this node by CreatePort

Return Value

By default this returns a GoEllipse that is somewhat larger than the port p.
Remarks
By default the ellipse uses a white brush--set the Pen and Brush properties to change the appearance. The shape is not itself selectable, resizable, or reshapable.
Example
If you override this method, you may want the definition to do some of the things that the standard definition does:
protected virtual GoShape CreateShape(GoPort p) {
  // create the bigger circle/ellipse around and behind the port
  GoShape e = new GoEllipse();
  SizeF psize = p.Size;
  e.Size = new SizeF(psize.Width + 2*7, psize.Height + 2*7);
  e.Selectable = false;
  e.Resizable = false;
  e.Reshapable = false;
  e.Brush = GoShape.Brushes_White;
  return e;
}
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

GoBasicNode Class
GoBasicNode Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback