Jump to content

delete listview item


Recommended Posts

I am trying to delete an item in a list view control. I am using _GUICtrlListView_DeleteItem on line 138. The line won't delete itself, but the _GUICtrlListView_SetItemText does work so it isn't the index. The $Clicked item comes from the WM_Notify function. It is the index of the item right clicked on in the list view. Why doesn't the index clicked on delete?

Shutdown_GUI.au3

Link to comment
Share on other sites

Try changing your delete line to the following

_GUICtrlListView_DeleteItem(GUICtrlGetHandle($ListView_Run), $Clicked_Item)

GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.
Link to comment
Share on other sites

A subtle difference which is not documented but is visible through reading the library code. If you use GUICtrlCreateListViewItem() the lparam of the LV_ITEM of the new item is it's @CtrlID. If you use _GUICtrListView_InsertItem() or _GUICtrlListView_AddItem() the lparam is by default 0. _GUICtrlListView_DeleteItem() use GUICtrlDelete() if the list view item lparam is not 0 but it should be 0 in your case, or I'm totally wrong :D

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