我是黑莓开发新手。我试图将文本放在按钮上,但它根本不起作用。应该有一个简单的解决方案,但我找不到它。这是我使用的代码
public class ProgramListView extends VerticalFieldManager{
private int _height;
private int _xPos;
private ButtonField evaluateButton;
//height is used to define each item height
//xPos is used to define each items position on screen
public ProgramListView(int height, int xPos){
this._height = height;
this._xPos = xPos;
evaluateButton = new ButtonField("Evaluate", ButtonField.CONSUME_CLICK){
//put methods in here to change the button's position
};
super.add(evaluateButton);
}
提前致谢。
最佳答案
ButtonField btnPreviewTone;
btnPreviewTone = new ButtonField(ButtonField.HIGHLIGHT_SELECT | ButtonField.CONSUME_CLICK);
btnPreviewTone.setLabel("Preview Ringtone");
我就是这样做的,它对我有用。谢谢
关于java - 如何在黑莓按钮字段上显示文本标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11482724/