Opened 15 years ago

Closed 15 years ago

#782 closed Bug (No Bug)

Problem _GUICtrlListView_DeleteItem

Reported by: Vitaliy K. aka VDX Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: _GUICtrlListView_AddItem() _GUICtrlListView_DeleteItem() Cc:


If ListViewItem created by _GUICtrlListView_AddItem() then _GUICtrlListView_DeleteItem() doesn't works. You should create items by GUICtrlCreateListViewItem() command.

Attachments (0)

Change History (2)

comment:1 Changed 15 years ago by VDX

Here's the sample code to check (Change "True" to "False"):

#Include <GuiListView.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$MainForm = GUICreate("VDX System deployment tool.", 657, 440, 218, 434)
$ListView1 = GUICtrlCreateListView("Setup|Application|Installed", 8, 8, 353, 425)
Sleep (3000)

If True Then

_GUICtrlListView_AddItem($ListView1, "1")
_GUICtrlListView_AddItem($ListView1, "2")
_GUICtrlListView_AddItem($ListView1, "3")
_GUICtrlListView_AddItem($ListView1, "4")


GUICtrlCreateListViewItem("Cool 1", $ListView1)
GUICtrlCreateListViewItem("Cool 2", $ListView1)
GUICtrlCreateListViewItem("Cool 3", $ListView1)
GUICtrlCreateListViewItem("Cool 4", $ListView1)


Sleep( 1000)

_GUICtrlListView_AddItem($ListView1, "Del 2")
_GUICtrlListView_DeleteItem($ListView1, 2)

Sleep (2000)

comment:2 Changed 15 years ago by Gary

  • Resolution set to No Bug
  • Status changed from new to closed

If you use a UDF to add/insert the data then you need to get the handle to the control for delete

_GUICtrlListView_DeleteItem(GUICtrlGetHandle($ListView1), 2)

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.