Sub SearchDocuments
If TextboxDocuments.Text = "" Then
fx.Msgbox(MainForm, "Enter a document name to begin search", "")
Return
End If
TmpList.Clear
ListIndex = 0
TmpDocSearch = TextboxDocuments.Text
For i = 0 To TableView.Items.size - 1
Dim arr() As String = TableView.Items.Get(i)
If arr(2).Contains(TmpDocSearch) Then
TmpList.Add(i) 'Just add the index to the row
End If
If TmpList.Size > 0 Then
ListIndex = 0
TableView.SelectedRow = TmpList.Get(ListIndex) 'Select the row from the index
TableView.ScrollTo (TmpList.Get(ListIndex))
If TmpList.Size = 1 And TmpList.Size < 2 Then
End If
'UpdateTableview
Else
ListIndex = -1
TableView.SelectedRow = -1
'Display no items found etc.
End If
Next
If ListIndex =-1 Then
fx.Msgbox(MainForm, "No match was found", "")
Return
End If
End Sub