1. Deleting List Items
- Posted by rswiston at hotmail.com Aug 01, 2002
- 396 views
Sorry if this message reaches everyone twice... problems with Topica (yeah, like there's a surprise!) have prevented my first one from being sent (or at least so I think?!) I am looking for help with list views, particularly with deleting items. My list are small (1-10 items) Here is my original code: for x = 1 to getCount(LV) do VOID = deleteItem(LV, x) end for This works most of the time, so I have implemented an addition... while getCount(LV) > 0 do for x = 1 to getCount(LV) do VOID = deleteItem(LV, x) end for end while This seems to be better, but sometimes send the program into a seemingly infinite loop that it can not break free from. It appears that win32lib does not always delete an item from a list view even though the program is coded to do exactly that. Is this a bug? Can someone explain what I might be missing here? This also happens in Lists, and Combo Boxes...? -Robert _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com
2. Deleting List Items
- Posted by rswiston at hotmail.com Aug 01, 2002
- 377 views
Can someone tell me why is that this does NOT delete all items in a list view? for x = 1 to getCount(LV) do VOID = deleteItem(LV, x) end for This sometimes leaves a line or two in the list view... so I've added this while getCount(LV) > 0 do for x = 1 to getCount(LV) do VOID = deleteItem(LV, x) end for end while While this helps 90% of the time, there are occasions that the computer "sits and spins" seemingly involved in an infinite loop that it cannot seem to break out of. Of course I have tried VOID = deleteItem(LV, -1) with no greater success. Can anyone tell me what I am missing? Is this a bug? -Robert _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com
3. Re: Deleting List Items
- Posted by 10963508 at europeonline.com Aug 02, 2002
- 387 views
----- Original Message ----- From: "Derek Parnell" <Derek.Parnell at SYD.RABOBANK.COM> > In the old versions of win32lib, that parameter to deleteItem() was not a > Row number but an Item ID. It use to be that each item added to a listview > was given a unique ID, and to delete them, you need to pass the item's ID. > That has all changed - sort of. Items are still given unique ids, but most > listview routines now work with row numbers and not ids. It's confusing that listivews have both rows and ids to identify them. It would be more clear if they would have only unique ids, so you don't have to worry about if user presses column header and sorts items or if you have autosort listview style.