【问题标题】:ObjectListField with image in Blackberry JDE黑莓 JDE 中带有图像的 ObjectListField
【发布时间】:2011-02-12 11:57:06
【问题描述】:

我需要在 Blackberry JDE 中添加带有图像的 ObjectListField

【问题讨论】:

    标签: blackberry jde


    【解决方案1】:

    http://developerlife.com/tutorials/?p=898

    public void drawListRow(ListField list, Graphics g, int index, int y, int w) {
    
        String text = (String) _data.elementAt(index);
    
        // draw the text /w ellipsis if it's too long...
        g.drawText(text,
                   _defaultRowWidth + _textImagePadding, y,
                   DrawStyle.LEADING | DrawStyle.ELLIPSIS,
                   w - _defaultRowWidth - _textImagePadding);
    
        // draw the to the left of the text...
        g.drawBitmap(0, y, _bitmap.getWidth(), _bitmap.getHeight(), _bitmap, 0, 0);
    
      }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多