小编Hea*_*kid的帖子

ListField中文本右侧的复选框

我想要带有图像的listfield和文本右侧的复选框.我在leftside上获得了图像,但右侧无法获得复选框.如果可能,复选框应该是不可见的.只应该看到tickmark.我想要实现

   Image text1 chechbox 
   Image text2 
   Image text3 checkbox            
Run Code Online (Sandbox Code Playgroud)

所有listitem的图像应该相同.

public final class ListfieldDemo1 extends MainScreen
Run Code Online (Sandbox Code Playgroud)

{

private Vector _listElements;
ListField list;
private ListField _checkList;

public ListfieldDemo1()
{        
    // Set the displayed title of the screen   
    super(Manager.NO_VERTICAL_SCROLL);
    add(new LabelField("Fruits List", LabelField.FIELD_HCENTER));
    add(new SeparatorField());
    setTitle("ListField with images and checkbox");
    _listElements = new Vector();
    add(new SeparatorField());
    list = new ListField();
    ListCallback _callback = new ListCallback(this);
    list.setCallback(_callback);
    list.setSize(4);
    int index = list.getSelectedIndex();

    add(list);

    createField();
}

    protected void createField()
    {
        String itemOne = "Apple"; …
Run Code Online (Sandbox Code Playgroud)

blackberry blackberry-jde

2
推荐指数
1
解决办法
718
查看次数

标签 统计

blackberry ×1

blackberry-jde ×1