Jump to content

Delete Listview Control


Recommended Posts

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.

Link to comment
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.

Link to comment
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}>

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

.

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...