问题描述
我必须证明能够或不足够大,以不适合于所有的设备一行的字符串,我想的labelField控制自动显示在原来的一个接一个新行剩余的文本,我的意思是喜欢.. 。auomatic CARRET回报,如果字符串不能在一行中显示,所有移动操作系统我已经试过这样做,但我不能让BB OS的工作,它只是截断我的字符串时,它喜欢,这是非常烦人。
I must show a string that can or not be large enough to not fit in one line in all devices, I want labelfield control to automatically show remaining text in a "new line" after the original one, I mean like... auomatic carret return if the string cannot be showed in a single line, all mobile OS I have tried do this, but I cannot make BB OS to work, it just truncates my string whenever it likes and it's very annoying.
感谢您
推荐答案
要做到这一点的方法之一就是把你HorizontalFieldManager包含VerticalFieldManager内将labelField。
One way to do this is put your HorizontalFieldManager that contains the LabelField inside a VerticalFieldManager.
例如
LabelField labelField = new LabelField("This is a very long sentance that I have written to show that the text will wrap around when it gets to the edge of the field.");
VerticalFieldManager vfm = new VerticalFieldManager();
HorizontalFieldManager hfm = new HorizontalFieldManager();
hfm.add(labelField);
vfm.add(hfm);
add(vfm);
这篇关于多行的labelField的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!