wxlistctrl.getitem returns int?
BlitzMax Forums/Brucey's Modules/wxlistctrl.getitem returns int?
| ||
Should getitem not return a wxlistitem, and request an integer argument rather then the other way around? Assuming I inserted all my items with "InsertImageStringItem", I can only retrieve the index integer of these items, but I see no way to retrieve the actual wxlistitem type with these indices. I probobly missed a function for this, but i'm still gathering getitem is mixed up. |
| ||
It expects to populate a passed-in wxListItem object. I can see your point, where this is a little different as to how you might expect it to work. But in one way, it can improve efficiency by the re-use of an object if you are retrieving many rows from the list. Something like : Local item:wxListItem = new wxListItem.Create() For i:int = 0 until list.GetItemCount() item.SetId(i) list.GetItem(item) ... Next I'm simply mirroring the API. Would you like a method which accepts an Int and returns a wxListItem? |
| ||
Ahh, wow..that is a little different than usual. Thanks for the method Brucey. I was thinking setid had something to do with it, but it seemed too odd to retrieve an item that way. Would you like a method which accepts an Int and returns a wxListItem? Nope, no worries. I'll adapt :) |