Jump to content

Recommended Posts

Posted

Hi all,

I've just updated my autoit installtion to the latest production release, BUT I discovered that this function: _GUICtrlListViewDeleteAllItems isnt a function anymore, they have changed it to _GUICtrlListView_DeleteAllItems . I've changed the function names to the new one, but now it gives me the following error:

Use GUICtrlDelete to delete items

Or if items were created with UDF functions MAKE sure to pass in handle to control NOT the controlid

Whats wrong, the code I used is the following:

_GUICtrlListView_DeleteAllItems($ListView0) ; Listview0, is the listview

Posted

Hi all,

I've just updated my autoit installtion to the latest production release, BUT I discovered that this function: _GUICtrlListViewDeleteAllItems isnt a function anymore, they have changed it to _GUICtrlListView_DeleteAllItems . I've changed the function names to the new one, but now it gives me the following error:

Whats wrong, the code I used is the following:

_GUICtrlListView_DeleteAllItems($ListView0) ; Listview0, is the listview

if you created the listview items using the built-in function then you need to use GuiCtrlDelete to delete the items

if you created the items using the UDF functions then you need to get the handle to the control and pass that in.

If you get the handle to the control and pass that in when the items were created using the built-in functions your on your own, this may have adverse affects.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted (edited)

replace $ListView0 by GUICtrlGetHandle($ListView0) and its work.

So : _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($ListView0))

Edited by NeuroToxic
  • 7 months later...
Posted

When one deletes a ListView Control, are all the items deleted, too?

I ask this since in my situation it is a bit frustrating to write the code to delete one item at a time, so I am experimenting the following alternative:

1) first, I create ListView $bl in window $mainwindow:

$bl = GUICtrlCreateListView("name|city",10,10,200,195)

2) then when I have to delete all the listview items, I do:

GUIctrldelete($bl)
guisetstate(@SW_ENABLE,$mainwindow)
$bl = GUICtrlCreateListView("name|city",10,10,200,195)

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
×
×
  • Create New...