I would like to set a fixed width for an input textfield with an embedded font. I would like to have the option to left-, right-, or center-justify the text. This is proving difficult.
If I set myTextField.autoSize = TextFieldAutoSize.LEFT;
, I get left-justified text, but the textfield width changes with each keystroke. Same trade-off with TextFieldAutoSize.RIGHT
and TextFieldAutoSize.CENTER
.
Now, if I use TextFieldAutoSize.NONE
, then I can fix the width and height of my textfield, making it the size I want... but the cursor is always blinking in the middle of the textfield. What's the secret to justifying that cursor to the left [or right] and the textfield staying the size I initially set it to?