wxGridCellRenderer

Robin

I'm trying but the wx.grid.GridCellRenderer.__init__(self, *args, **kwds) is crashing.

Nigel

···

---
<b>Nigel W. Moriarty</b>

----- Original Message ----
From: Robin Dunn <robin@alldunn.com>
To: wxpython-users@lists.wxwidgets.org
Sent: Thursday, April 3, 2008 3:41:56 PM
Subject: Re: [wxpython-users] wxGridCellRenderer

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!

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

      ____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

Nigel W. Moriarty wrote:

Robin

I'm trying but the wx.grid.GridCellRenderer.__init__(self, *args, **kwds) is crashing.

That's because you are leaving out the "Py" of PyGridCellRenderer.

···

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!