在BlackBerry的ListField中显示一个EditField [英] Display an EditField in a ListField of BlackBerry

查看:62
本文介绍了在BlackBerry的ListField中显示一个EditField的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我必须显示价格在EditField中的项目列表.如何在列表中添加EditField?

In my app i have to display list of items with price in EditField. How can i add EditField in list?

对于ListField,我正在使用此代码

For ListField, i am using this code

public void drawListRow(ListField listField, Graphics graphics, int index,
        int y, int width) {

    this.listField=listField;
    String text=(String) get(listField, index);
    if(holder[index]==null)
    {
        holder[index]=placeholder;
    }
    graphics.setColor(rgb);
    graphics.setFont(Utility.getBigFont(DConfig.getFSize()+4));
    graphics.drawBitmap(3,y+7,placeholder.getWidth(), placeholder.getHeight(),holder[index], 0, 0);
    graphics.drawText(text,100,y+15);  
    graphics.drawText("Price:",100,y+30);
    graphics.drawText(CartScreen.price[index],100,y+45);
    graphics.drawLine(0, y+74, DConfig.disWidth, y+74);
}

如何将编辑字段添加到行列表

How can i add edit field to list of rows

推荐答案

您将无法在其中实际放置EditField.最好的选择是只使用VerticalFieldManager并在其中堆叠LabelFields/EditFields.它仍然会滚动,只是不会是ListField.

You won't be able to actually place the EditField in there. Your best bet is to use just a VerticalFieldManager and stack LabelFields/EditFields in there. It will still scroll, just won't be ListField.

这篇关于在BlackBerry的ListField中显示一个EditField的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆