[wxpython-users] wxGridCellRenderer

Robin Dunn robin at alldunn.com
Thu Apr 3 15:41:56 PDT 2008


Nigel W. Moriarty wrote:
> Hi Folks
> 
> I'm trying to change the behaviour of the boolean cell renderer to show a # and nothing similar to the python comment character.  I'd be happy to subclass the base class but I can't get past the __init__ which fails with the following:
> 
>   File "/net/rosie/scratch1/nigel/phenix-1.3b-final/reel/reel/RestraintGrid.py", line 24, in __init__
>     wx.grid.GridCellRenderer.__init__(self, *args, **kwds)
>   File "/net/rosie/scratch1/nigel/phenix-1.3b-final/build/intel-linux-2.6-x86_64/base/lib/python2.5/site-packages/wx-2.8-gtk2-ansi/wx/grid.py", line 112, in __init__
>     def __init__(self): raise AttributeError, "No constructor defined"
> AttributeError: No constructor defined

You need to derive custom renderers from wx.grid.PyGridCellRenderer.


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!



More information about the wxpython-users mailing list