Re: Virtual wxListCtrl
Dietmar Schwertberger <[email protected]> Sat, 1 Jan 2022 22:20:27 +0100
| Newsgroups | gmane.comp.python.wxglade |
|---|---|
| Message-ID | <[email protected]> |
On 01.01.2022 22:08, David Grawrock wrote: > > When I mark a listctrl as being virtual, the generated code doesn’t > have anything for the columns, nor can I figure out how to create the > extra class to handle the virtual On… stubs. How do you create the > extra class? > Have e.g. a look at the wxPython demo GridHugeTable.py at https://github.com/wxWidgets/Phoenix/blob/master/demo/GridHugeTable.py There you have a class HugeTable that will provide contents and also the dimensions (via GetNumberRows / GetNumberCols). You need to implement a class like this for your data, probably in a separate file. Then create an instance, e.g. 'self.table = HugeTable()' and call 'self.my_grid.SetTable(self.my_table, True)' You can add the import and instantiation code to the "Code" properties inside wxGlade. Regards and a happy new year, Dietmar _______________________________________________ wxGlade-general mailing list wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/wxglade-general