Hboxcontainer children defaulting to intial "X"width[Godot 3.1.1-Windows10/64]

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By starzar

[Godot 3.1.1-Windows10/64]

While adding a child like LineEdit ,TextEdit,Button etc to the Hboxcontainer ,and changing it’s “x” width ,the child’s width keeps defaulting to it’s original “x” value of “58”.

Also ,when a new child is added by duplicating the existing child (whose width was manually changed {other than 58}),the new child defaults to a width of “58” and is placed at a “x” position of 62 (58width +4margin ) from the left edge of the Hboxcontainer .This behavior is seen for additional children as well.

Following Default Values were used for the above test
(testing with other values also generated similar , above mentioned behavior)
Hboxcontainer—> Alignment -Begin,GrowDirection -End , SizeFlag - Fill
ChildNode- → Alignment -Left ,GrowDirection -End , SizeFlag - Fill

Anchor,Margin etc have not been changed and have been kept at their default values.
Note -RightMargin also defaults to 58 .

Is this a bug or am I missing something?

:bust_in_silhouette: Reply From: flurick

The function of a Container is to override position and size of any child control (except the minimum size). This is at the moment only enforced when trying to edit the child control visually via the 2D view and not in the inspector.

Yeah , in an ideal case -the function of a Container is to override the position and size of any child control (except the minimum size).
But when the child doesn’t scale automatically to fit the Container and keeps defaulting to an arbitrary constant size (“58” Xwidth,[in this case]) ,then the above argument no longer holds.

starzar | 2019-09-05 06:14