HI, I already searched on the forum for an answer and it could be this one, but to be honest, I don't know how to implement it on my case...
I'm having around 100 lines on my txt and I'm filtering each of these through a search on edittext6.
Edittext 5 shows all the results with what is being searched on edit6.
Since
would make the process heavier, I'm creating a List variable and connecting it to the txt file at the b4x page creating.
So I'm having this code
After I'll filter the results, I will now have only 1 result in edit 5, and i'm going to modify that string by myself by hand ( so not by code..)
So now I have to save all the things
I thought about
, but it wouldn't make sense since in edit6 there aren't all the txt lines but only the result after the search...
Any idea? Much thanks
I'm having around 100 lines on my txt and I'm filtering each of these through a search on edittext6.
Edittext 5 shows all the results with what is being searched on edit6.
Since
B4X:
For Each line As String In File.ReadList(...)
So I'm having this code
B4X:
On class global
Dim chiavi As List
on B4XPage_Created
chiavi= File.Readlist(File.DirInternal,"chiavi.txt")
Private Sub EditText6_TextChanged (Old As String, New As String)
EditText5.Text = ""
For Each line As String In chiavi
If line.trim.ToUpperCase.Contains(EditText6.Text.trim.ToUpperCase) Or line.trim.ToUpperCase.startswith(EditText6.Text.trim.ToUpperCase) Then
EditText5.Text= EditText5.Text & CRLF & CRLF & line
End If
Next
If EditText6.Text="".Trim Then
EditText5.Text="".Trim
End If
End Sub
After I'll filter the results, I will now have only 1 result in edit 5, and i'm going to modify that string by myself by hand ( so not by code..)
So now I have to save all the things
I thought about
B4X:
File.WriteString(File.DirInternal, "chiavi.txt", edittext5)
Any idea? Much thanks
Last edited: