Modify

Opened 16 years ago

Closed 16 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 Changed 16 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)

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 Changed 16 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

Action
as closed The ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.