Noobster24 Posted June 14, 2006 Share Posted June 14, 2006 Hi, ;more code $listview = GUICtrlCreateListView ("Naam|ID",125,5,500,345,-1,BitOR($LVS_EX_REGIONAL, $LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES)) _GUICtrlListViewSetColumnWidth($listview,0,390) _GUICtrlListViewSetColumnWidth($listview,1,106) $B_DESCENDING = _GUICtrlListViewGetSubItemsCount($listview) If IsArray($Links) And IsArray($Names) Then For $i = 0 To UBound($Links) - 1 GUICtrlCreateListViewItem($Names[$i] & '|' & $Links[$i],$listview) Next EndIf ;more code This is a part of my script to make a ListView to put some data in. I created a button named Clear: ;more code $about = GuiCtrlCreateButton("About", 10, 260, 60, 30) $afsluiten = GuiCtrlCreateButton("Afsluiten", 10, 310, 60, 30) $zoek = GuiCtrlCreateButton("Zoek!", 10, 160, 60, 30) $clear = GuiCtrlCreateButton("Clear", 10, 210, 60, 30) ;morecode And if the button is clicked, i want to clear the listview, so that is empty again... I searched in the beta help, but i can only find this function: _GUICtrlListClear But that function isn't working, i use it like this: ;more code GuiSetState() While 1 $msg = GuiGetMsg() If $msg = $about Then MsgBox(64,"About & Credits","This is a special one to W.C. Van Bart-Kuiper!") If $msg = -3 OR $msg = $afsluiten Then ExitLoop If $msg = $zoek Then _Check($sq) If $msg = $clear Then _GUICtrlListClear($listview) If $msg = $listview Then _GUICtrlListViewSort($listview, $B_DESCENDING, GUICtrlGetState($listview)) WEnd What's the function to clear the data from $listview? Programs so far:Teh Serializer - Search for licenses for Nero - Windows - Office - Alcohol etc. Link to comment Share on other sites More sharing options...
GaryFrost Posted June 14, 2006 Share Posted June 14, 2006 _GUICtrlListViewDeleteAllItems 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...
Noobster24 Posted June 14, 2006 Author Share Posted June 14, 2006 _GUICtrlListViewDeleteAllItemsSo easy, yet so hard to find Thank you! Programs so far:Teh Serializer - Search for licenses for Nero - Windows - Office - Alcohol etc. Link to comment Share on other sites More sharing options...
sykes Posted June 14, 2006 Share Posted June 14, 2006 We need a new function: _GuiCtrlFindWhatImLookingFor We have enough youth. How about a fountain of SMART? Link to comment Share on other sites More sharing options...
GaryFrost Posted June 14, 2006 Share Posted June 14, 2006 We need a new function: _GuiCtrlFindWhatImLookingFor _GuiCtrlFindWhatImLookingFor 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...
seandisanti Posted June 14, 2006 Share Posted June 14, 2006 _GuiCtrlFindWhatImLookingForVERY NICE! any progress on the _IHaveAProblemButYouHaveToGuessWhatMyCodeIs() udf? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 15, 2006 Moderators Share Posted June 15, 2006 VERY NICE! any progress on the _IHaveAProblemButYouHaveToGuessWhatMyCodeIs() udf? _IHaveAProblemButYouHaveToGuessWhatMyCodeIs() Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
GaryFrost Posted June 15, 2006 Share Posted June 15, 2006 _IHaveAProblemButYouHaveToGuessWhatMyCodeIs()More Like:_IHaveAProblemButYouHaveToGuessWhatMyCodeIs() 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...
Moderators SmOke_N Posted June 15, 2006 Moderators Share Posted June 15, 2006 (edited) More Like:_IHaveAProblemButYouHaveToGuessWhatMyCodeIs()Edit:That will be my new answer instead of a long speech. Edited June 15, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
seandisanti Posted June 15, 2006 Share Posted June 15, 2006 More Like:_IHaveAProblemButYouHaveToGuessWhatMyCodeIs()aww. work blocked that one for me so i can't see what it is... Link to comment Share on other sites More sharing options...
Zachlr Posted April 14, 2009 Share Posted April 14, 2009 I have #Include <GuiListView.au3>, but I still get ERROR: _GUICtrlListViewDeleteAllItems(): undefined function. I am using version 3.3.0.0. Link to comment Share on other sites More sharing options...
Mat Posted April 14, 2009 Share Posted April 14, 2009 (edited) I have #Include <GuiListView.au3>, but I still get ERROR: _GUICtrlListViewDeleteAllItems(): undefined function. I am using version 3.3.0.0.yep its now _GUICtrlListView_DeleteAllItems ;================================================================================================ ; depricated functions will no longer work ; =================================================================================================== ; #OLD_FUNCTIONS#=============================================================== ; Old Function/Name ; --> New Function/Name/Replacement(s) ; =========================================================================== ;_GUICtrlListViewCopyItems ; --> _GUICtrlListView_CopyItems ;_GUICtrlListViewDeleteAllItems ; --> _GUICtrlListView_DeleteAllItems Edited April 14, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
CodyBarrett Posted April 14, 2009 Share Posted April 14, 2009 More Like:_IHaveAProblemButYouHaveToGuessWhatMyCodeIs()HA! thats funny! lol i wish telepathy was possible then we would know what everyone wanted! [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Mat Posted April 14, 2009 Share Posted April 14, 2009 HA! thats funny! lol i wish telepathy was possible then we would know what everyone wanted!still doesn't mean we'd be able to answer it though. AutoIt Project Listing Link to comment Share on other sites More sharing options...
CodyBarrett Posted April 14, 2009 Share Posted April 14, 2009 no but then we wouldnt have to waste time asking OH yeah you have any code to start? or RIGHT! now what are you using this for? hmm? a trogan? thats naughty! sorry man this is a little off topic my BAD [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Zachlr Posted April 14, 2009 Share Posted April 14, 2009 yep its now _GUICtrlListView_DeleteAllItems ;================================================================================================ ; depricated functions will no longer work ; =================================================================================================== ; #OLD_FUNCTIONS#=============================================================== ; Old Function/Name ; --> New Function/Name/Replacement(s) ; =========================================================================== ;_GUICtrlListViewCopyItems ; --> _GUICtrlListView_CopyItems ;_GUICtrlListViewDeleteAllItems ; --> _GUICtrlListView_DeleteAllItems Ah! Thank you! Link to comment Share on other sites More sharing options...
Cusem Posted June 22, 2009 Share Posted June 22, 2009 _GUICtrlListView_DeleteAllItems returns FALSE in my script and I don't know why. I have a globally declared listview Local $iExWindowStyle = BitOR($WS_EX_DLGMODALFRAME, $WS_EX_CLIENTEDGE) Local $iExListViewStyle = BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_DOUBLEBUFFER) $LV_Main = GUICtrlCreateListView("", 150, 100, 860, 430, $WS_BORDER) _GUICtrlListView_SetExtendedListViewStyle($LV_Main, $iExListViewStyle) It is populated by a function that does: If _GUICtrlListView_InsertColumn($LV_Main, 0, "Column1", 70) = -1 Then $rr += 1 If _GUICtrlListView_InsertColumn($LV_Main, 1, "Column2", 80) = -1 Then $rr += 1 If _GUICtrlListView_InsertColumn($LV_Main, 2, "Column3", 70) = -1 Then $rr += 1 If _GUICtrlListView_InsertColumn($LV_Main, 3, "Column4", 70) = -1 Then $rr += 1 If _GUICtrlListView_InsertColumn($LV_Main, 4, "Column5", 90) = -1 Then $rr += 1 If _GUICtrlListView_InsertColumn($LV_Main, 5, "Column6", 100) = -1 Then $rr += 1 If _GUICtrlListView_InsertColumn($LV_Main, 6, "Column7", 200) = -1 Then $rr += 1 If _GUICtrlListView_InsertColumn($LV_Main, 7, "Column8", 40) = -1 Then $rr += 1 If _GUICtrlListView_InsertColumn($LV_Main, 8, "Column9", 50) = -1 Then $rr += 1 If _GUICtrlListView_InsertColumn($LV_Main, 9, "Column10", 45 )= -1 Then $rr += 1 If _GUICtrlListView_InsertColumn($LV_Main, 10, "Column11", 40) = -1 Then $rr += 1 Dim $aDBMainWork[195][12] _GUICtrlListView_AddArray($LV_Main, $aDBMainWork) Called from another function MsgBox(0, "tesT", _GUICtrlListView_DeleteAllItems($LV_Main)) returns False _GUICtrlListView_RegisterSortCallBack($LV_Main) Was the only thing I can think about what was causing the error, so I added _GUICtrlListView_UnRegisterSortCallBack($LV_Main) MsgBox(0, "tesT", _GUICtrlListView_DeleteAllItems($LV_Main)) But with no succes. Anybody got any idea what is going wrong? I'm on 3.3.0.0 on XP SP2 x64 Link to comment Share on other sites More sharing options...
Cusem Posted July 23, 2009 Share Posted July 23, 2009 Solved it. I had to use _GUICtrlListView_DeleteAllItems(CtrlGetHandle($LV_Main)) instead of _GUICtrlListView_DeleteAllItems($LV_Main). It is however pretty unclear to me when to use CtrlGetHandle($x) instead of just $x. If anybody could explain this? 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