ListFieldCallBack DrawListRow will not display background on first convocation

I have been racking my head for a few hours trying to get this working.  The bottom of my custom list field updates only when it is updated, not on initial load.  I have a custom listfield (modification of the listfield example).  From my main screen, I opened a 2nd screen, load the list and display the data.  It works without error.

My problem is that in the drawListRow of ListFieldCallback, I have:

public void drawListRow(ListField listfield, Graphics g, int index, int y, int width) {   EventTableList tableListField = (EventTableList) listfield; Background bkg = BackgroundFactory.createSolidBackground(Color.CHOCOLATE);  tableListField.setBackground(bkg);              TableRowManager rowManager = tableListField._rows[index];                       rowManager.drawRow(g, 0, y, width, tableListField.getRowHeight());              }

The text of each line, but the background is only updated when I

(a) highlight the line

(b) add or delete a folder (which calls the method of painting even I call from my listfield constructor).

* I have a myPaint method in the class listfield invalidate calls, my constructor is called and it is also called when a record is added/removed from the list.

Any thoughts on what could happen?

I use the 4.6 component package.

Thanks in advance.

set the background when you create the listfield.

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for