Text alignment in InputBox (GUI)

Hello there, please, is there some way to center the text in the “InputText” GUI component? The text should be in the middle of “Input text”. Thanks for your time.

I would evaluate margin-property of InputText:

input.margin = 0.5*(width - advancedTexture.getContext().measureText(input.text).width) + 'px';

PG:

Additionally you can add observer of onTextPasteObservable for paste-cases.

3 Likes

@Takemura, you are on fire !!! thanks for all the help within the community !!!

I have to thank aswell. It is a pleasure to work with you guys and participate on this awesome engine.