ListBox.InvalidateCell

From Xojo Documentation

Method

ListBox.InvalidateCell(row as Integer, column as Integer)

New in 5.5

Supported for all project types and targets.

Redraws the specified cell "from scratch" rather than using the data in the internal buffer.

Notes

row and column are zero-based. If you pass a -1 as the row or column parameter, it will redraw the specified entire row or column, i.e., Invalidate(2, -1) redraws row number 2. The CellBackgroundPaint and CellTextPaint events execute when InvalidateCell is called.

InvalidateCell should be necessary only if you are using a custom storage mechanism for your ListBox data. If the contents of the ListBox are stored in the ListBox cells, the ListBox will update automatically as needed.

This method doesn't have a high overhead if used unnecessarily since nothing will happen if the specified cell is not visible.

Example

The following example redraws the specified cell.

Listbox1.InvalidateCell(1, 0)