gpt4 book ai didi

java - 黑莓中的对象选择字段

转载 作者:行者123 更新时间:2023-12-02 08:28:30 26 4
gpt4 key购买 nike

我想让 ObjectChoice 字段具有固定长度。但默认情况下,ObjectChoice 长度是基于内容长度的。

例如,如果内容是“Choice 1”、“Choice Choice Choice 1”,则 ObjectChoice 字段根据所选选项采用不同的长度。

最佳答案

使用此示例/示例:

String choices[] = {"0","1","2","3","4"};

ObjectChoiceField choice1 = new ObjectChoiceField("", choices, ""){
public void layout(int width, int height){
width = 80;
super.layout(getWidth(), getHeight());
super.layout(width, height);
setExtent(width, super.getHeight());
}
};

关于java - 黑莓中的对象选择字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3986682/

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