2 Nov 2005 13:17
Your list problem
Hi Claudio, I assume you want to show some data from a database, for this I think the wx.ListCtrl is a better widget, instead of the wx.TextCtrl, so I modified frame6.py file (see attached). What did I do: - replaced the textctrl with a listctrl - copied some code from the listctrl sample in the wxPython demo to make a minimum working sample - copied the images.py file from the wxPython demo to get the images for the listctrl What you might want to do: - look at the demo of the wx.ListCtrl in more details - if you have lots of data (thousands of rows) then you should look at the virtual sample - if you have not so much then the basic one (which I used) is fine, however you could take some more from the demo to have dynamic sorting if you click on the headers and/or automatic sizing of the columns. If you want to do this you should create a module/class based on the demo sample and include it in your Boa code using the custom_class support. - change the data stuff to get things from your database. Hope this helps Werner
RSS Feed