GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoGeneralNode Class / CreateIcon Method / CreateIcon(ImageList,Int32) Method
Example
In This Topic
    CreateIcon(ImageList,Int32) Method
    In This Topic
    Create and initialize a GoImage to act as the node's icon.
    Syntax
    protected virtual GoObject CreateIcon( 
       ImageList imglist,
       int imgindex
    )

    Parameters

    imglist
    imgindex

    Return Value

    a GoNodeIcon that obeys this node's MinimumIconSize and MaximumIconSize properties
    Example
    If you override this method, you may want the definition to do some of the things that the standard definition does:
    protected virtual GoObject CreateIcon(System.Windows.Forms.ImageList imglist, int imgindex) {
      GoNodeIcon ni = new GoNodeIcon();
      ni.ImageList = imglist;
      ni.Index = imgindex;
      ni.MinimumIconSize = new SizeF(20, 20);
      ni.MaximumIconSize = new SizeF(1000, 2000);
      ni.Size = ni.MinimumIconSize;
      return ni;
    }
    See Also