I have a listbox with two events, CellBackgroundPaint and CellTextPaint.
The listbox has 3 rows and 2 columns.
Event CellBackgroundPaint and CellTextPaint both contains: system.DebugLog("Row: “+str(row)+” - "+"Column: "+str(column))
A button fires the command: Listbox1.InvalidateCell(1,1)
The above InvalidateCell command should only update row 1 and column 1, but unfortunately all rows and columns are effected as you can see in the debug log:
I’ve been doing some experimenting with the ListBox and InvalidateCell as well lately, because of Cocoa performance issues (see the other recent thread, really bad how sluggish it behaves under Cocoa, borderline unusable). As I have experimented with various workarounds, I am starting to think it refreshes the grid many, many times when it shouldn’t. I’ve put counters in the CellBackgroundPaint and the CellTextPaint events and often moving from one cell to another via the mouse, or making a call RowFromXY will call the paint events hundreds of times. I’m still digging to find the issue, but I think what you are seeing is probably related to the cause.