Hello,
I am using a single line listview to show a list of files. I would like to use SetSelection to highlight the chosen file.
How do you set a particular item to be the highlighted item? I want to do this as a response to an item click and also when populating the list.
I have tried many different things. Below is my latest attempt.
Thanks,
Barry.
I am using a single line listview to show a list of files. I would like to use SetSelection to highlight the chosen file.
How do you set a particular item to be the highlighted item? I want to do this as a response to an item click and also when populating the list.
I have tried many different things. Below is my latest attempt.
B4X:
j = -1
For i=0 To WFList.Size-1
s = WFList.Get(i)
lvWFile.AddSingleLine(s)
If (s.CompareTo(WFName) = 0) Then j = i
Next
If (j >= 0) Then lvWFile.SetSelection(j)
Thanks,
Barry.