Programmatically, you can do this by setting the SelectedRowIndex to -1:
Listbox1.SelectedRowIndex = -1
For the user to accomplish it, you’d probably need to use the Pressed event to compare the SelectedRowIndex to the Row parameter to implement a toggle.
To implement this, I added the following property to the page:
Private Property selectedIndex As Integer = -1
Then, in the WebListBox’s Pressed event:
if selectedIndex = -1 or selectedIndex <> row then
selectedIndex = row
else
if me.SelectedRowIndex = selectedIndex then
me.SelectedRowIndex = -1
selectedIndex = -1
end if
end if
This implements a toggle when the user presses a row. If it’s already selected then it’s deselected.