Sub SelectRow(Row As Int, SelCol As Int, Mode As Int)
Dim col, index As Int
index=SelectedItems.IndexOf(Row)
GetView(Row, col).Color = Colors.Green
If index>-1 Then ' row already selected
For col = 0 To NumberOfColumns - 1
GetView(Row, col).Color = CellColor(col)
Next
SelectedItems.RemoveAt(index)
If SelectedItems.Size=1 Then
Row=SelectedItems.Get(0)
End If
Else
If Mode=0 Then
SelectedItems.Add(Row)
Else If Mode=2 Then
For col = 0 To NumberOfColumns - 1
GetView(PreviousRow, col).Color = CellColor(col)
Next
End If
For col = 0 To NumberOfColumns - 1
GetView(Row, col).Color = SelectedRowColor
Next
End If
If Mode=1 Then
For col = 0 To NumberOfColumns - 1
GetView(PreviousRow, col).Color = CellColor(col)
GetView(Row, col).Color = SelectedRowColor
Next
End If
If SelectedItems.Size=0 Then
Else If SelectedItems.Size=1 Then
SelectedItems.Set(0,Row)
name99=GetView(SelectedItems.Get(0), 0).Text
mail99=GetView(SelectedItems.Get(0), 1).Text
PreviousRow=Row
Else
End If
End Sub