Maybe
wxPolygonShape.__init__(self,parent)
works?
···
wxPolygonShape.__init__(self)
Hi,
I need to get the object that is represented by a selected wxShape. To
make this work I subclassed the shape:class tsPolygonShape(wxPolygonShape):
def __init__(self,parent):
wxPolygonShape.__init__(self)
self.parent=parentbut when I try to get the parent as in:
for shape in self.diagram.GetShapeList():
if xber[0]<shape.GetX()<xber[1]:
if yber[0]<shape.GetY()<yber[1]:
shape.Select(true, dc)
selektiert.append(shape.parent)it leads only to:
Traceback (most recent call last):
File "fem2.py", line 707, in OnEndDragLeft
selektiert.append(shape.parent)
AttributeError: wxPyShapePtr instance has no attribute 'parent'I therefore have 2 questions:
Is it feasible to subclass wxShapes at all?
If not, what can I do?
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org