ok, i tried this one here:
Code:
private static class ListCallback implements ListFieldCallback {
private Vector listElements = new Vector();
public void drawListRow(ListField list, Graphics g, int index, int y,int w) {
Graphics tmp = new Graphics(myIcon);
Bitmap mybitmaP = Bitmap.getBitmapResource("icon.gif");
String text = (String)listElements.elementAt(index);
//Image source; // the image to be copied
//source = Image.createImage(myIcon);
//g.drawImage(source,0,y,0);
//g.drawImage(tmp,0,y,0);
g.drawImage(mybitmaP,0,0,0);
g.drawText(text,15,y,0,w);
} But my lovely compiler said:
Quote:
cannot find symbol
symbol : method drawImage(net.rim.device.api.system.Bitmap,int,int ,int)
location: class net.rim.device.api.ui.Graphics
g.drawImage(mybitmaP,0,0,0);
|
so I think I have to change mybitmaP into a Graphic (Typ Graphics) or so...
how do I change the Type of my bitmap or how do I convert a Bitmap into a Graphics?
thx hibbert