[wxPython-users] wx.Grid and row/column span

Eric Ongerth ericongerth at gmail.com
Fri Jun 1 11:30:30 PDT 2007


On 6/1/07, Nizam Sayeed <ibnameen at gmail.com> wrote:
>
> The app that we are planning to port uses a Tk-based widget called
> TableList which has this feature. One of the main drivers for us to look =
at
> other toolkits is that the TableList is extremely slow when you load it w=
ith
> a few thousands rows or more.
>


wxPython's wx.grid.Grid class should perform a lot better than that if you
use a virtual table with it.  To do this, you subclass
wx.grid.PyGridTableBase; write your table base class in such a way that it
virtualizes or caches the data, only re-fetching the data the long way
around if the data has actually changed.  The Grid will only look up the
rows it is actually displaying at the time, and combined with an
intelligently designed GridTableBase it will have no trouble keeping a large
table smooth.  You probably looked at the MegaGrid example in the demo;
that's somewhat less impactful because it's simply generating its cell
values on the fly anyway, but one can easily see the advantages of the
caching/virtualization/view behavior.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200706=
01/6e2a2516/attachment.htm


More information about the wxpython-users mailing list