在 Flash 中格式化文本输入

发布于 2024-11-09 09:33:07 字数 384 浏览 4 评论 0原文

看起来 textInput 的默认字体格式有点不对。顶部的边距小于底部的边距。

我已经尝试过 setTextFormat、defaultTextFormatsetTextFormat 但它没有解决问题。

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迷乱花海 2024-11-16 09:33:07

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.

固执像三岁 2024-11-16 09:33:07

调整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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文