I use a search box to locate a matching row in a Web listbox. I can find it, highlight it, but cannot get it to scroll so that it is showing (like at the top of the listbox).
For i As Integer = 0 to lstAccounts.RowCount -1
If lstAccounts.CellTextAt(i, 0).IntegerValue = SID Then // TextValue = trim(Me.text) Then
Row = i
Exit For
End If
Next i
lstAccounts.SelectedRowIndex = Row
lstAccounts.SelectedRowColor = Color.Blue
lstAccounts.ScrollTo(Row)
Used the code you posted here, and this is the result:
macOS, Chrome, Xojo 2023r2 (Firefox, Safari working too)
This is the code used for button ‘To 176’
// Listbox1.ScrollTo(175)
Var row As Integer
For i As Integer = 0 To listbox1.RowCount -1
If listbox1.CellTextAt(i, 0).IntegerValue = 176 Then // TextValue = trim(Me.text) Then
Row = i
Exit For
End If
Next i
listbox1.SelectedRowIndex = Row
listbox1.SelectedRowColor = Color.Blue
listbox1.ScrollTo(Row)
I found the cause. Since 2023R2 is running so slow, I used 2023R1.1. It looks like there were some definite improvements made to the web listbox in the 2023R2 release.