Jump to content

Deleting all occurrences in list view


Jewtus
 Share

Recommended Posts

I have a listview in one of my GUIs and I have a button and box for filtering the results.
 

This is the function I'm using right now:

$Index=_GUICtrlListView_FindInText($List,GUICtrlRead($FilterInput))
                MsgBox(0,"test",$Index)
                _GUICtrlListView_DeleteItem($List,$Index)

I've tried using the $bWrapOK command in the find, but I don't really understand how it works.

Basically, what I'm trying to do is find every occurrence of the input filter and delete anything that DOESN'T contain that value.

Tips/Suggestions?

Link to comment
Share on other sites

Perfect! Thats what I needed.

For anyone who wants the code:

Case $Clean
For $j=UBound($array) -1 to 0 Step -1
$Cleanval=_GUICtrlListView_GetItemText($List,$j,2)
If StringInStr($Cleanval,GUICtrlRead($FilterInput))=0 Then _GUICtrlListView_DeleteItem($List,$j)
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...