wxPython: wxGrid vs. wxListCtrl

Andrei project5 at redrival.net
Tue Jun 29 15:54:11 EDT 2004


Piet wrote on 29 Jun 2004 12:16:11 -0700:

<snip>
> Building the tree view was not a problem, but I haven´t found a good
> widget for the "grid view" component. wxGrid allows to edit the
> content of the table (which will be the attribute values) but I
> haven´t found a way to link a specific cell to a certain xml node.

Have you looked at the Huge grid table example in the demo, the one with
the 100 million cells? It demonstrates how to use a  table for the grid.
I've made an app inspired by that example which loads stuff on demand from
a bsddb and stores changed items immediatly back to the db - seems quite
similar to what you intend to do. 

> This is important, because when the cell content changes I would like
> to be able to directly communicate this change to the underlying xml
> tree (in the tree component of the editor, this is already achieved).

The Grid table is basically sitting in between the grid that the user sees
and whatever storage backend you have. The grid asks the table for data to
be inserted in cell at some coordinates, the table does whatever it deems
necessary and answers. Even better, the grid asks the table about what
attributes each displayed cell should have (color, read-only, custom
editor, the whole lot). 

-- 
Yours,

Andrei

=====
Real contact info (decode with rot13):
cebwrpg5 at jnanqbb.ay. Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V ernq
gur yvfg, fb gurer'f ab arrq gb PP.



More information about the Python-list mailing list