0
$\begingroup$

Is it possible to align text in InputField Right/Centered? (Seems Left is default)

Seems there is no alignment option for InputField.

What I want is center - More specifically, Real-time centered : I mean the text should be aligned centered even when typing something in the input field.

In every examples shown in the MMA help, it is aligned Left. Screenshot :

enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

Actually InputField has the option Alignment:

Options[InputField] // Short

out

And it works as expected:

InputField[Dynamic[x], Alignment -> Center]

screenshot

$\endgroup$
1
  • $\begingroup$ Thank you for Options[InputField]! $\endgroup$
    – imida k
    Commented Aug 23, 2022 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.