I have again a problem with one of the samples, the ClassDiagramNode:
I want to have a ClassDiagramNode with a constant width because all items of the list and the comlete headersection are updated every 10 seconds.
If I use the property 'ItemWidth' it doesn't work. It is not clear (for me!), which method (for example LayoutChildren, DoResize) at what time is executed.
I used the property AutoResizes and AutoRescales of the Label of the ClassDiagramNode. It seems to work. But what happen if one item of the list will be resized ?
Is there a property of the whole ClassDiagramNode which determines the width and which properties I have to set (AutoResizes = false ?) ?
ClassDiagramNode, unless you set it to Resizable=true, is a fixed-width node where setting ItemWidth should determine the width of the node (ItemWidth + node margins).
If the text in the labels is too long for the ItemWidth given, it will display as "label val..."
Start Demo1, select the ClassDiagramNode and hit F4... and play with the properties. that should give you a feel for the behavior with different settings.
DoResize won't be called unless you set it to be Resizable and allow it to have resize handles.
LayoutChildren is fundamental to GoNodes.... it gets called anytime the geometry of any of the children change.
thank you for your help, it makes it a bit clearer for me. But there is still a problem, the same 'problem' I see also in your sample Demo1:
If I change the text in one item inside of a list (for example 'attr2' to 'hello to all and have a nice day'), the whole ClassDiagramNode change its size. Neither the property Resizable = false for the class ClassDiagramNode nor for the classes ClassDiagramNodeItem or ClassDiagramNodeItemList can help.
I don't want to have any changes of the size. If the text of any line change, if the user expand or collapse any list.
The property ClassDiagramNodeItem.GoText.Clipping = true doesn't help.
I think I am successful!
For the ClassDiagramNodeItem I have to set the property Resizable= false and a constant Width which is a little bit smaller than the constant width of the ClassDiagramNode.
The Clipping for the GoText inside the ClassDiagramNodeItem doesn't work - but maybe after a few hours ;-))