黑莓 API 6.0。如何使 LabelField 更宽(以使其停止强制换行)?
我有一个扩展 LabelField 的类来设置字体和颜色。 我有 2 个这样的自定义 LabelField,它们显示一些文本字符串。这些字符串相当短,大约有十几个符号长。
问题是这些自定义 LabelField 强制换行。它们会破坏我的字符串并将其显示为 2 行,而不是仅 1 行(无论字符串是 6 个字符还是 12 个字符长)。
如何使这些 LabelField 停止强制换行? 我需要让一根线保持一根线。
更新: 我已经找到了这个问题的原因。 问题出在另一个层面上 - 在计算包含这些 LabelFields 的弹出屏幕的宽度和高度的过程中。
I have a class which extends LabelField to set font and color.
I have 2 such custom LabelFields and they display some strings of text. Those Strings are rather short, about a dozen symbols long.
The problem is that these custom LabelFields enforce new lines. They break my strings and display them in 2 lines instead of only 1 (no matter if a String is 6 or 12 characters long).
How to make these LabelFields stop enforcing new lines?
I need to have one line stay one line.
Update:
I have found the reason of that problem.
The problem was on another level, - in the process of calculation of width and height for my popup Screen which contained those LabelFields.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)