DesktopListBox.RefreshCell

From Xojo Documentation

Method

DesktopListBox.RefreshCell(row as Integer, column as Integer)

New in 2021r3

Supported for all project types and targets.

Redraws the specified cell from scratch.

Notes

If you pass a -1 as the row or column parameter, it will redraw the specified entire row or column, i.e., RefreshCell(2, -1) redraws row number 2. The PaintCellBackground and PaintCellText events execute when RefreshCell is called.

RefreshCell should be necessary only if you are using a custom storage mechanism for your DesktopListBox data. If the contents of the DesktopListBox are stored in the DesktopListBox cells, the DesktopListBox 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.RefreshCell(1, 0)