How to center the text in an text input field?

i am using text input fields where user has to type in some text.
by default all text inputs are displayed left aligned.

the headline is the question.

Text will center but only if there is more than one line. You can work around this by doing a text modify = NewLine()+“what you want to display centered here” Hope that makes sense :slight_smile:

1 Like

its a single line only.
i found this section in the .json-file
and tried to add “textAlignment”: “center” (and also “text-align”: “center”),
but that does not effect at all.

“assetStoreId”: “”,
“name”: “usersize”,
“tags”: “”,
“type”: “TextInput::TextInputObject”,
“variables”: [],
“effects”: [],
“behaviors”: [],
“content”: {
“initialValue”: “”,
“placeholder”: “?”,
“fontResourceName”: “Ubuntu-Bold.ttf”,
“fontSize”: 30,
“inputType”: “text”,
“textColor”: “208;2;27”,
“textAlignment”: “center”,
“fillColor”: “255;255;255”,
“fillOpacity”: 255,
“borderColor”: “0;0;0”,
“borderOpacity”: 255,
“borderWidth”: 1,
“readOnly”: false,
“disabled”: false