Dear all,
I am trying to create a custom property class that derives from wx.propgrid.PGProperty in order to provide custom data to the event handler when the property was clicked (in my case right-clicked).
To do so I thought this would be as easy as subclassing PGProperty.
Unfortunately it yields the following exception:
Traceback (most recent call last):
File “property_grid.py”, line 43, in
app = testApp()
File “C:\Python27-win32\lib\site-packages\wx-3.0-msw\wx_core.py”, line 8631, in init
self._BootstrapApp()
File “C:\Python27-win32\lib\site-packages\wx-3.0-msw\wx_core.py”, line 8196, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File “property_grid.py”, line 16, in OnInit
frame.SetSizer(self.create_property_grid(frame))
File “property_grid.py”, line 24, in create_property_grid
pg.Append(CustomProperty(“Custom data”, “foo”))
File “property_grid.py”, line 7, in init
Pg.PGProperty.init(self, label)
File “C:\Python27-win32\lib\site-packages\wx-3.0-msw\wx\propgrid.py”, line 357, in init
_propgrid.PGProperty_swiginit(self,_propgrid.new_PGProperty(*args))
NotImplementedError: No matching function for overloaded ‘new_PGProperty’
The “constructors” for i.e. wx.propgrid.StringProperty seem to be nothing but factory functions.
Can anyone give me a pointer where to go from here?!
Thanks & cheers,
Jan
property_grid.py (949 Bytes)