When the search text changes, I loop through the data.
if I find a matching row, I scroll so as to put it at the top
Var searchtext As String
For x As Integer = 0 To threads.ubound
searchtext =descriptions(x)
If searchtext.IndexOf(0,value) > 0 Then
Me.ScrollToRow (x,True, iosmobiletable.ScrollPositions.Top)
Exit
End If
Next
Exception
PROBLEM:
Every time a letter is added, the onscreen keyboard goes away.
How can I keep it on screen so that a word can be entered, rather than one letter?
Delay the scoll using timer.callater and cancel it before the scroll:
Var searchtext As String
For x As Integer = 0 To threads.ubound
searchtext =descriptions(x)
If searchtext.IndexOf(0,value) > 0 Then
Timer.cancelcallater weakaddressof scrollto
Me.ScrollToRow (x,True, iosmobiletable.ScrollPositions.Top)
Timer.calllater 500, WeakAddressOf scrollto
Exit
End If
Next
Exception
This way while the user is typing this calllater resets itself. Could be done with a normal timer too
Thanks.
That does improve matters when I used a delay of 1000
Still living in hope for a method that will scroll the list without losing the keyboard, however, since what the above workaround does is to delay the scroll. The keyboard still goes away if the user pauses to look for a letter