retrieve entire list from wx.ListCtrl?

Is there a way to retrieve the entire list at once, as a list, for a wx.ListCtrl object? I can get items individually and I could loop through and create my own list, just wondering if there was a method to do it directly?

Thanks,

Ken

Ken wrote:

Is there a way to retrieve the entire list at once, as a list, for a wx.ListCtrl object? I can get items individually and I could loop through and create my own list, just wondering if there was a method to do it directly?

Thanks,

Ken

Since normally you populated the list, wouldn't you have a copy of all the items in the list stored in a list internally?

-Larry

Sure, but the users can delete items from the list. Right now I remove from the list as well as the listctrl on delete which works fine, was just wondering if there was some method for pulling out the entire list from the listctrl.

Ken

Larry Bates wrote:

···

Ken wrote:

Is there a way to retrieve the entire list at once, as a list, for a wx.ListCtrl object? I can get items individually and I could loop through and create my own list, just wondering if there was a method to do it directly?

Thanks,

Ken

Since normally you populated the list, wouldn't you have a copy of all the items in the list stored in a list internally?

-Larry

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Ken wrote:

Is there a way to retrieve the entire list at once, as a list, for a wx.ListCtrl object? I can get items individually and I could loop through and create my own list, just wondering if there was a method to do it directly?

There isn't.

On the other hand if you use the listctrl in virtual mode then you can keep the list as your main data store and the listctrl will pull from it as needed for displaying items. Then you will always have access to the list just by looking at your data store.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!