[wxPython-users] Grid Cell Renderer
Mark Erbaugh
mark at microenh.com
Wed Jan 2 18:14:46 PST 2008
On Wed, 2008-01-02 at 16:56 -0800, Robin Dunn wrote:
> Mark Erbaugh wrote:
> > Is there a simple Grid Cell renderer that would allow me to simply
> > convert the cell's value to a string? Or is there another place to
> > convert the cell's data to a display string?
> >
> > I'm using a GridTable and I know I could do the conversion in the
> > GetValue method, but that seems like adding a view-specific function to
> > the model. Also, I've written a Grid Cell editor that needs the raw
> > cell value, so I would like to have GetValue return that.
>
> The table's GetValue is supposed to always deal with strings in order to
> comply with the API. There is some limited support to query the table
> and find out if it can provide the value as other types, but so far it
> can only deal with longs, doubles and bools. In the past I've thought
> that it would be nice for the table to be able to provide the data as a
> PyObject* (ie, any Python object) but I haven't tried implementing that
> yet.
Robin,
Thanks for the explanation.
Mark
More information about the wxpython-users
mailing list