Hi,
i tried to get a listfield with different sized rows, but this was not possible. so my next idea is, to get a white field and use the paint method to draw the listfield myself, thoughit must not be selectable, there should be no problem with this.
The problem i encountered is, that when the field gets longer than the screen, i am unable to scroll down.
Heres the class of my custom field:
Code:
public class MessageList extends Field {
private Vector messages = null;
public MessageList(Vector mes) {
super(NON_FOCUSABLE);
this.messages = mes;
}
protected void layout(int width, int height) {
setExtent(width, height);
}
protected void paint(Graphics graphics) {
for(int i = 0; i < 400; i = i+50) {
graphics.drawText("blabla" + Integer.toString(i), 15, i, 0, this.getWidth());
}
}
}
The field gets added on a simple mainscreen with scrolling enabled.
Maybe anybode has an idea how to get the scrolling working or how to develop a white scrollable field to draw on.
Regards,
Daniel