Sign in to follow this  
Followers 0
DjDeep00

Delete Listview Control

4 posts in this topic

I am trying to delete the entire listview control not just one row or column. I am able to delete any other control by using GUICtrlDelete() except for listview. Somehow GUICtrlDelete($listview) doesn't seem to work. Thanks in advance.

Share this post


Link to post
Share on other sites



I don't use GUI very much (only a couple times to play around)...but couldn't you just create a new window, and set the other controls on it again...?


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

I am trying to delete the entire listview control not just one row or column.  I am able to delete any other control by using GUICtrlDelete() except for listview.  Somehow GUICtrlDelete($listview) doesn't seem to work.  Thanks in advance.

<{POST_SNAPBACK}>

Well, At least I can tell you that you are not the only one. I have had to $GUI_HIDE it and reuse my handles creating it again to "refresh" the control. Because I am resusing my handles, I cant actually tell you if $GUI_SHOW would make it re-appear. I hope not, cause that would cause run-away memory usage if done too many times.

And not to seem picky, but you would probably get more responses if this were posted in the GUI forum, just FYI.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I am trying to delete the entire listview control not just one row or column.  I am able to delete any other control by using GUICtrlDelete() except for listview.  Somehow GUICtrlDelete($listview) doesn't seem to work.  Thanks in advance.

<{POST_SNAPBACK}>

If you just want to hide it or disable it just use

GUICtrlSetState ( controlID, state )

with state as;

$GUI_HIDE or

$GUI_DISABLE

If you want to delete all items in a listview use this function

Func _clearlistview($List_View)
   Local $LVM_DELETEALLITEMS = 0x1009
   GUICtrlSendMsg($LIST_VIEW, $LVM_DELETEALLITEMS, 0, 0)
EndFunc  ;==>_clearlistview

$List_View is the name of the Listview.

I Know this is not exactly what you asked for but alot of times I find it best to work around things sometimes.

Edited by quick_sliver007

.

Share this post


Link to post
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
Sign in to follow this  
Followers 0