ListBox.EditCell
From Xojo Documentation
This item was deprecated in version 2019r2. Please use ListBox.EditCellAt as a replacement. |
Scrolls the row, column cell into view (if necessary) and temporarily makes the cell editable. row and column are zero-based. It sets the focus within the ListBox to the row, column cell and selects its contents, if any. The editable cell has a focus ring around it.
Notes
Use the CellType or ColumnType properties to change a cell or column to “inline editable” when you want the user to be able to edit the contents of the ListBox. Then call the EditCell method for each cell. This gives the editable cell the focus and selects the current text of the cell, if any. Typing replaces the cell's contents. When the user presses Tab or Return or clicks in another cell, the cell loses the focus and the contents of the cell are saved (this also calls the CellAction event handler).
When a cell is editable, the ActiveCell property is the TextEdit that contains the contents of that cell. This may be a TextField or a TextArea depending on the specified column type. You can use this property to set or get the text of the Listbox cell, set the selection, or change other properties of the ListBox's TextField or TextArea.
Example
The following code in the CellClick event makes the cell the user clicked on editable. The parameters row and column are passed to the function.
This code marks an entire column as editable:
In the CellClick event handler, you can then check if the column was clicked and then enable editing: