[wxPython-users] Virtual ListCtrl and GetItemData: recursion error

Werner F. Bruhin werner.bruhin at free.fr
Mon Jul 23 02:32:59 PDT 2007


Hi Wojciech,

Wojciech Śmigaj wrote:
> ...
> thanks for the answer. I'll follow your suggestion. Initially I 
> thought that, despite not holding the text/images etc. for particular 
> items, a virtual list should at least offer the possibility to 
> associate the integer "data" to be used as the key (which would then 
> stay unchanged if the list was resorted etc.).
You might want to look into:

wx.EVT_LIST_CACHE_HINT

I use a virtual list to display data from a database.  When initially 
loading it I get all the appropriate primary keys (have one table with 
about 20,000 rows and it still has very good response) and store the 
result from the select in an attribute of the list, then I have another 
attribute which caches a few pages of the list, so if the users pages 
up/down I don't get have to go to the database all the time.

Werner




More information about the wxpython-users mailing list