Width of group does not update when the width of a child component changes

Kevin Hilt shared this problem 9 months ago
Known

Using 8.1.1, the width of a parent group does not update when the width of one of its child components changes. Group.width remains the same as the initial width of the group.


See the attached project where two labels are grouped and one of those child labels has its width increased at runtime.

Comments (5)

photo
2

In the outline, if you drag and drop a child element (i.e. an element already in the group) on the group parent, the parent width will then adjust to the appropriate width (or height, or both). This is perhaps best done using the last child in the group since the bottom of the group is where an element is placed by default when it is dragged and dropped on a group parent.

Granted, this width/height adjustment should happen automatically whenever child elements are changed, unfortunately this is not currently the behavior.

Hope this helps. Cheers!

photo
1

It sounds like the dynamic update issue I described is expected, though problematic. Thanks for the clarification.

photo
1

Yeah, although I guess I should have qualified the "adjustment should happen automatically" statement with "in my humble opinion", since there may be a logical reason, of which I am not aware, for this not being the default behavior.

photo
1

I agree with you. As it stands, group.width is (nearly) useless once its content size has been modified at runtime.

photo
1

I never mess with the height and width property values of any group parent because it usually creates unwanted changes to the children of the group, especially when you have images within the group. That's why I only change position settings of a group parent and handle the height and width as we have described above.

photo