我必须显示一个字符串,该字符串可以或不够大,以不适合所有设备的一行,我希望 labelfield 控件自动在原始字符串之后的“新行”中显示剩余文本,我的意思是.. . 如果字符串不能在一行中显示,则自动返回,我尝试过的所有移动操作系统都这样做,但我无法让 BB OS 工作,它只是随时截断我的字符串,这很烦人。
谢谢
最佳答案
一种方法是将包含 LabelField 的 HorizontalFieldManager 放在 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);
关于blackberry - 多行标签字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6433396/