How to align a control on an advanced dynamic texture

Hello,

I’m adding a control to an advanced dynamic texture and would like to align it top left on that texture, is this possible? (default is centered vertically & horizontally)

I know a texture has a rootContainer, would I need to configure that?

My specific use case is this: https://playground.babylonjs.com/?snapshot=refs/pull/11710/merge#Q9VZS9#930

My end goal is to have the InputTextArea sit in the top left of the texture and expand to the right and down as text is entered.

Thanks very much!

Related PR:

Hi! It is certainly possible, take a look at The Babylon GUI | Babylon.js Documentation (babylonjs.com)

Great thanks, would it be possible to show an example in the playground link above?

I tried: advancedTexture.rootContainer.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_TOP

but it does not seem to have any effect.

Is there somewhere else I should be applying the alignment?

it does look like the answer is as simple as:

    textInput.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_TOP
    textInput.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT

but for some reason this does not work in the playground, it does work in my local project though:

Thanks!