在 Flash 中格式化文本输入
看起来 textInput 的默认字体格式有点不对。顶部的边距小于底部的边距。
我已经尝试过 setTextFormat、defaultTextFormat
和 setTextFormat
但它没有解决问题。
var tf:TextFormat = new TextFormat();
tf.size = 16;
_autoComplete.textField.defaultTextFormat = tf;
_autoComplete.textField.setTextFormat(tf);
有什么想法吗???
我正在使用 Astra 的自动完成功能,但我不认为这会限制它,尽管该字段有可能被覆盖。
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 using Astra's autoComplete, but I don't think this is restricting it, though there is a slight chance that the field has an override.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
TextFormat
不会帮助你(它是关于文本颜色、粗体、斜体等)。您可以尝试执行_autoComplete.textField.autoSize = flash.text.TextFieldAutoSize.LEFT
。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
.调整TF的高度
tf.height = tf.textHeight + X; // X - 是字体正确显示所需的数量。
Adjust the height of the TF
tf.height = tf.textHeight + X; // X - is the amount needed for you font to look corectly.