LayoutChildren Not Being Called As Expected

Hi!

I am trying to track down why the LayoutChildren method in my GoNode is not always called each time a child’s size changes.

Specifically, I have a string value (GoText child) inside my GoNode. When I click on the string to edit it’s value, and make the string longer, the parent’s LayoutChildren method fires. Conversely, when I click on the string to edit it’s value, and make the string shorter, the parent’s LayoutChildren method does not fire. It’s as if the parent’s LayoutChildren method only fires when the the parent needs to grow in size but won’t fire if the parent doesn’t need to grow in size. I’ve played around with resizable and rescalable attributes but I’m not having much luck figuring this out.

What could prevent the LayoutChildren method from firing in all cases a child’s size changes?

Thanks for your help.

R. Houston

Is the text AutoResize = false? Does the node have ListGroups within ListGroups (like InfoNode4, for example) ? If so, the child listgroups may be handling the text resize without the need for the parent to be involved.

Hi Jake,

Yes, the text is inside a GoListGroup. The GoListGroup is the
child of the GoNode.

I want the GoNode to resize, to both grow AND shrink, based on the
node’s contents. But that is not happening. Currently, the node is only growing in size.

What do I need to do to get the parent (GoNode) LayoutChildren method
to fire? Currently, the GoListGroup child is not overridden (not it’s own class) and is created inside the constructor for the GoNode and added to the GoNode in the constructor as well. Do I need to override the GoListGroup and override it’s LayoutChildren method? If so, what would need to go in the overridden LayoutChildren Method in order to ensure the parent GoNode’s LayoutChildren method is called?

Thanks a lot for your help.

R. Houston

Jake,

I forgot to mention…

The text Autoresizes attribute is set to true (autoresizes = true). Without
it set to true I can’t edit it’s value even if the text’s editable attribute is
set to true (editable = true).

Thoughts, comments?

Thanks.

R. Houston

If you can, send me the code.

If you can you break the node class into something I can compile / run without the rest of your app, that would be helpful.

Hi Jake,

Good news, sort of…

I managed to fix the problem by forcing the parent to call it’s LayoutChildren method by setting InvalidBounds = True and then
calling LayoutChildren(Nothing). In the LayoutChildren method I
“Finessed” a suitable outcome (also known as hacking). It would
be nice to know why the parent’s LayoutChildren was not called
automatically.

Thanks again for your help.

R. Houston