Jump to content

question about how to Search for custom text in the ListView


Recommended Posts

Hi dears
how are you? I hope You fine
I have a question please
I've created a listView
It has several columns
Is there any way  to search for text in an element of this list with text in all columns
for example
list view with 2 column
the first is the file name and the second is the file path
and i want to search for the item witch Containt the name and the path toGether
I searched a lot but could not find what I was looking for
If you do not understand the idea that I'm looking for, I can put an example
Thanks in advance

Link to comment
Share on other sites

While you could probably use _GUICtrlListView_FindText and _GUICtrlListView_FindInText you could just search through the listview with something like:
nb: Didn't quite follow what you were trying to achieve, but thought you would get the idea.

$iListView = _GUICtrlListView_GetItemCount($idListView)
For $i = 0 To $iListView
    If _GUICtrlListView_GetItemText($idListView, $i, 0) = "Search Item" Then
        If _GUICtrlListView_GetItemText($idListView, $i, 1) = "Second Search Item" Then
            MsgBox(0,"", _GUICtrlListView_GetItemText($idListView, $i, 0) & @CRLF & _GUICtrlListView_GetItemText($idListView, $i, 1))
        EndIf
    EndIf
Next

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...