iOSMobileTable search hides keyboard

I have an iOSMobileTable
I enable Search

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

well than you can wait for full words. Otherwise this works best.

What you may need is to block the keyboard from going down, i wonder why xojo even hides the keybord and not just let’s you do the showing/hiding…

I’m adding my own text box above the list for searching.
Works instantly, doesn’t close the keyboard.

Did you try without animation?

Me.ScrollToRow (x, False, iosmobiletable.ScrollPositions.Top)

The keyboard doesn’t dismiss in my app when I set animations to false and also reference the Section:

Me.ScrollToRow (section, x, False, iosmobiletable.ScrollPositions.Top)
1 Like