I am using Python 2.2.1 and wxPython 2.4.2.4 on Win2000.
I would like to customize the drawing functions a DC provides.
Now I tried to create a new DC by using wxPaintDC as father class. This
works in C++ with wxWidgets, but I get some errors in wxPython.
Traceback (most recent call last):
File "scrollmap.py", line 197, in __OnPaint
self.DoRepaint (dc)
File "scrollmap.py", line 293, in DoRepaint
dc.BeginDrawing()
File "D:\Python22\lib\site-packages\wxPython\gdi.py", line 567, in
BeginDrawin
g
val = gdic.wxDC_BeginDrawing(self, *_args, **_kwargs)
TypeError: Type error in argument 1 of wxDC_BeginDrawing. Expected _wxDC_p.
Exception exceptions.AttributeError: "CosmosMapDC instance has no attribute
'thi
sown'" in ignored
Is it not possible to inherit from a wxPaintDC in wxPython?
I am using Python 2.2.1 and wxPython 2.4.2.4 on Win2000.
I would like to customize the drawing functions a DC provides.
Now I tried to create a new DC by using wxPaintDC as father class. This
works in C++ with wxWidgets, but I get some errors in wxPython.
Traceback (most recent call last):
File "scrollmap.py", line 197, in __OnPaint
self.DoRepaint (dc)
File "scrollmap.py", line 293, in DoRepaint
dc.BeginDrawing()
File "D:\Python22\lib\site-packages\wxPython\gdi.py", line 567, in
BeginDrawin
g
val = gdic.wxDC_BeginDrawing(self, *_args, **_kwargs)
TypeError: Type error in argument 1 of wxDC_BeginDrawing. Expected _wxDC_p.
Exception exceptions.AttributeError: "CosmosMapDC instance has no attribute
'thi
sown'" in ignored
Do you call wx.PaintDC.__init__ from your __init__?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!