DesktopListBox.CellAction

From Xojo Documentation

Event


DesktopListBox.CellAction(Row as Integer, Column as Integer)

New in 2021r3

Supported for all project types and targets.

If a cell is editable, a CellAction event occurs when the user finishes editing a cell.

Notes

“Finishing editing” is defined as exiting the cell after clicking in it. Tabbing out of the editable cell or clicking another cell triggers this event. Clicking a checkbox in a checkbox cell also qualifies as "finishing editing".

The user doesn't necessarily have to change the contents.

Sample Code

This code will display changes made to an editable cell when the user finishes editing (by either pressing return or switching to a different cell):

If column = 2 Then // Is this the editable column?
MessageBox("You entered: " + Me.Cell(row, column))
End If

This event handler is also called when the user clicks a CheckBox cell:

If column = 3 Then // Is this the CheckBox column?
If Me.CellCheckBoxAt(row, column) Then
MessageBox("You checked the checkbox in row " + row.ToString)
Else
MessageBox("You unchecked the checkbox in row " + row.ToString)
End If
End If