When is it neccessary to call GoSimpleNode.Initialize (GoDiagram for windows, version 2.3.1) ?
The reason why I am asking is that I observe different behaviour of GoSimpleNodes depending on whether Initialize is called or not.

  1. When Initialize is not called, Trying to move a selection of simplenodes will only move the single GoSimpleNode that is dragged. If you hold shift and drag, the entire selection is dragged, and if you subsequently releases the shift and do a new drag, the entire selection is still moved. Seems to be a bug. When initialize has been called on the simple nodes, the whole selection can be moved without pressing the shift key.
  2. GoSimpleNodes snaps to the upper right corner when Initialize has not been called, but to the center of the icon when Initialize has been called.
    So my questions are:
  3. what is the purpose of GoSimpleNode.Initialize ?
  4. should you always call it when constructing a new GoSimpleNode ?
  5. The documentation only says that the simple node is initialized, but if this method always must be called, then why is it not done in the ctor ?
    Kind Regards
    Stig Nielsson

Is your question inspired by the discussion in http://www.nwoods.com/forum/forum_posts.asp?TID=1059&PN= 1 ?
If you create a GoSimpleNode without calling Initialize, you’ll basically have an empty GoNode–there won’t be any Icon, any Label, or any Ports. But I’m guessing you did call CreateIcon, CreateLabel, and CreatePort, assigning the results of each to the Icon, Label, and …Port properties, respectively. Otherwise you wouldn’t have anything to see.
The additional thing Initialize does is modify the behavior of the Location, Shadowed, Resizable, Reshapable, ResizesRealtime properties, to refer to the Icon instead of to the whole node. The Location, in particular, is defined to be the Center of the Icon.
The documentation says that you should always call Initialize after constructing a GoSimpleNode. (The same is true for GoIconicNode and GoGeneralNode.) The reason it cannot be done in the constructor is because the constructor cannot know how to initialize the GoImage that is used as the Icon.