Modify

Opened 17 years ago

Closed 17 years ago

#782 closed Bug (No Bug)

Problem _GUICtrlListView_DeleteItem

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

Description

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 by VDX, 17 years ago

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)

GUISetState(@SW_SHOW)
If True Then

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

Else

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

EndIf


Sleep( 1000)

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

Sleep (2000)

comment:2 by Gary, 17 years ago

Resolution: No Bug
Status: newclosed

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)

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.