Stack panel horizontal alignment

The horizontal alignment is not working.
I tryed at the playground to be sure.

var panel = new BABYLON.GUI.StackPanel();
panel.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_BOTTOM;
panel.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;

Hey and welcome!

do you mind creating a repro on the PG?

panel.width is probably just 100%

Excact code that iā€™m using.

@JFerret as suspected :slight_smile:

Solution 1; - Adapt to children width

chatStack.adaptWidthToChildren = true;

Solution 2; - Hard-code same width as children

chatStack.width = ā€œ400pxā€;

1 Like

My apologies, iā€™m new to Babylon and java script :smiley:

Thank you for the solution, it works like i wanted!