forum-msg-id-134652-edit

Original date:2019-11-04 10:40:24 Edited by: irv Subject: Re: Need A Quick Fix

Did you want to remove all games? There's no need for a loop!

Here's the docs:

deleteItem() also works with list view and tree view controls. position should be the item id returned when the item was created. To delete all items in a list view or tree view, position should be -1.

deleteItem(Game_List,-1) 

Did you intend to remove just one?

If so, note the docs - it does not expect the name of the item (e.g. "Ducktales"). You are passing a string. It needs the item id of the selected item. Something like:

id = getIndex(Game_List) -- id of the selected item on the list 
if id > 0 then -- if no item is selected, this will be zero, so don't bother deleting 
  deleteItem(Game_List,id) 
end if 

Note: It has been 10 years since I did anything with Windows or Win32lib. Hope this is correct.

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu