Sign in to follow this  
Followers 0
jvanegmond

NOBUG: Possible bug in _GUICtrlListView_DeleteAllItems and _GUICtrlListView_DeleteItem

3 posts in this topic

#1 ·  Posted (edited)

#include <GuiConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <WindowsConstants.au3>

GUICreate("Example", 300, 250)

$Lst_Players = GUICtrlCreateListView("", 5, 5, 275, 240, BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER, $LVS_REPORT) )
_GUICtrlListView_SetExtendedListViewStyle($Lst_Players, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES) )
_GUICtrlListView_SetUnicodeFormat($Lst_Players,True)
_GUICtrlListView_AddColumn($Lst_Players, "Players", 255)

$hImage = _GUIImageList_Create(11,11)
_GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap(GUICtrlGetHandle($Lst_Players), 0xFFFFFF, 11, 11))
_GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap(GUICtrlGetHandle($Lst_Players), 0x00FF00, 11, 11))
_GUICtrlListView_SetImageList($Lst_Players, $hImage, 1)

_GUICtrlListView_AddItem($Lst_Players, Random(0,1000),0)
_GUICtrlListView_AddItem($Lst_Players, Random(0,1000),1)
_GUICtrlListView_AddItem($Lst_Players, Random(0,1000),0)
_GUICtrlListView_AddItem($Lst_Players, Random(0,1000),1)
_GUICtrlListView_AddItem($Lst_Players, Random(0,1000),0)
_GUICtrlListView_AddItem($Lst_Players, Random(0,1000),1)
_GUICtrlListView_AddItem($Lst_Players, Random(0,1000),0)
_GUICtrlListView_AddItem($Lst_Players, Random(0,1000),1)

_GUICtrlListView_DeleteAllItems($Lst_Players) ;; Doesn't work

GUISetState()

While 1
    If GUIGetMsg() = -3 Then
        Exit
    EndIf
WEnd

Edited by Manadar

Share this post


Link to post
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
Sign in to follow this  
Followers 0