[wxPython-users] Grid Cell Renderer

Mark Erbaugh mark at microenh.com
Wed Jan 2 11:25:34 PST 2008


On Wed, 2008-01-02 at 06:58 +0100, Raffaello Barella wrote:
> Could you please tell what kinds of data you want to convert to a
> string?
> 
> 2008/1/2, Mark Erbaugh <mark at microenh.com>:
>         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 data is an integer that corresponds to the string. I have a dict
that has the integer as the key and the string as the value.

wxPython has a GridCellEnumRenderer but I can't seem to get that working
and other than it's existence, I can't find any documentation on it.
It's not listed in the wxWidgets documentation, although it is there in
the C++ code.

Mark




More information about the wxpython-users mailing list