tags:

views:

230

answers:

1

I need to add ObjectListField with image in Blackberry JDE

A: 

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);

  }
MIchael Grassman