I need to chagne an image of node along with an event out of go diagram. For this, I think I should know how to get/set a node identification first. But, couldn’t find any where - perhaps, I missed.
Thank you, Joohyun
To change the image of a node, you need to get the node’s GoImage object, and then you can set its properties, such as GoImage.Name (for images in ResourceManagers) or GoImage.Index (for images in an ImageList, in Windows Forms).
There are any number of ways to identify a particular node. It depends on what your application wants to do.
You can associate an integer with a node by using the GoNode.UserFlags property.
You can associate any custom object of yours by using the GoNode.UserObject property.
You can use the GoNode.PartID that GoDocument can maintain for you, by setting GoDocument.MaintainsPartID to true. Or else you can use GoNode.PartID for your own purposes, if GoDocument.MaintainsPartID stays false.
You can define your own subclass inheriting from the node class that you want to use, and add your own fields (data members).