grid table and direct grid management

Alexandru Popa wrote:

I have a simple and perhaps stupid question. I'm trying to use a wx.Grid
and I am not sure of the advantages of using a PyGridTableBase to supply
the data to the Grid instead of directly managing the Grid object. I'm
mainly interested to know if there is an advantage to the table when
using very large data sets, for example does the PyGridTableBase support
"virtual paging" of the grid? That is, I don't want it to load all the
data in the grid at once, but dynamically add it while scrolling.

Yes, that is the main point of the table class. The grid will ask the table for the items as they are needed for display. Where/when/how the table gets the data for those items is entirely up to you. It also makes it possible to deal with data values that are not strings if you want, and to manage things like grid cell attributes (fonts, colors, etc.) in a more data-driven manner if you need to.

···

--
Robin Dunn
Software Craftsman