formatting textInput in Flash
It looks like the default font formatting for the textInput is a bit off. The margin at the top is less than at the bottom.
I've tried the setTextFormat, with defaultTextFormat
and setTextFormat
but it's not doing the trick.
var tf:TextFormat = new TextFormat();
tf.size = 16;
_autoComplete.textField.defaultTextFormat = tf;
_autoComplete.textField.setTextFormat(tf);
Any ideas ???
I'm usi开发者_运维知识库ng Astra's autoComplete, but I don't think this is restricting it, though there is a slight chance that the field has an override.
TextFormat
will not help you (it's about text color, bold, italic and etc). You may try to do _autoComplete.textField.autoSize = flash.text.TextFieldAutoSize.LEFT
.
Adjust the height of the TF
tf.height = tf.textHeight + X; // X - is the amount needed for you font to look corectly.
精彩评论