WebListBox.Cell

From Xojo Documentation

Method

WebListBox.Cell(RowNumber As Integer, ColumnNumber As Integer) As String

Supported for all project types and targets.

Used to read from or write to the cell based on the row and column numbers passed. Row and Column are zero-based. The top-left cell is 0,0.

Notes

The Caption can be surrounded by "<raw></raw>" tags to temporarily disable HTML parsing. For example, you could bold just a single word in a Cell by doing this:

Me.Cell(0, 0) = "<raw><b>bold</b></raw> text"

Examples

This code is in the SelectionChanged event. It gets the text of the row the user clicked on and writes it to a Label:

Label1.Text = Me.Cell(Me.ListIndex, 0)

This code in the CellClick event changes the value of the cell the user clicked:

Me.Cell(row, column) = "You clicked me"

This example uses Cell to replace the contents of the selected row with the contents of two WebTextFields:

If PeopleList.ListIndex = -1 Then
// The WebListBox.AddRow method allows you to pass multiple parameters
// to add values to other columns of the new row
PeopleList.AddRow(FirstNameField.Text, LastNameField.Text)
Else
PeopleList.Cell(PeopleList.ListIndex, 0) = FirstNameField.Text
PeopleList.Cell(PeopleList.ListIndex, 1) = LastNameField.Text
End If