PcExpert Posted January 5, 2008 Share Posted January 5, 2008 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 itemsOr if items were created with UDF functions MAKE sure to pass in handle to control NOT the controlidWhats wrong, the code I used is the following: _GUICtrlListView_DeleteAllItems($ListView0) ; Listview0, is the listview Link to comment Share on other sites More sharing options...
GaryFrost Posted January 5, 2008 Share Posted January 5, 2008 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 listviewif you created the listview items using the built-in function then you need to use GuiCtrlDelete to delete the itemsif 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. Link to comment Share on other sites More sharing options...
PcExpert Posted January 5, 2008 Author Share Posted January 5, 2008 So I cannot use the function I mentioned to delete ALL items? Link to comment Share on other sites More sharing options...
NeuroToxic Posted January 5, 2008 Share Posted January 5, 2008 (edited) replace $ListView0 by GUICtrlGetHandle($ListView0) and its work. So : _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($ListView0)) Edited January 5, 2008 by NeuroToxic Link to comment Share on other sites More sharing options...
GaryFrost Posted January 5, 2008 Share Posted January 5, 2008 replace $ListView0 by GUICtrlGetHandle($ListView0) and its work.So : _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($ListView0))As I said under certain circumstances this will be a use at your own risk call. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
PcExpert Posted January 5, 2008 Author Share Posted January 5, 2008 It works now, thanks! Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 5, 2008 Share Posted January 5, 2008 As I said under certain circumstances this will be a use at your own risk call.Why is that? What are the possible conflicts? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
GaryFrost Posted January 5, 2008 Share Posted January 5, 2008 Why is that? What are the possible conflicts? http://www.autoitscript.com/forum/index.php?showtopic=57758 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Zomp Posted August 30, 2008 Share Posted August 30, 2008 http://www.autoitscript.com/forum/index.php?showtopic=57758 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) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now