gpt4 book ai didi

java - 如何在黑莓按钮字段上显示文本标签

转载 作者:行者123 更新时间:2023-12-01 15:16:59 25 4
gpt4 key购买 nike

我是黑莓开发新手。我试图将文本放在按钮上,但它根本不起作用。应该有一个简单的解决方案,但我找不到它。这是我使用的代码

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com