need help with wxpython.
wxpython code is made with boa-constructor
when i run the code i get this error message:
Traceback (most recent call last):
File "wxApp1.py" , line 24, in ?
main()
File "wxApp1.py" , line 20, in main
application = BoaApp(0)
File "K:\Python23\li b\site-packages\wxPyth on\wx.py", line 1945, in __init__
_wxStart(self.O nInit)
File "wxApp1.py" , line 13, in OnInit
self.main = wxFrame1.create (None)
File "wxFrame1.p y", line 12, in create
return wxFrame1(parent )
File "wxFrame1.p y", line 220, in __init__
self._init_ctrl s(parent)
File "wxFrame1.p y", line 157, in _init_ctrls
EVT_RIGHT_DOWN( self.treeCtrl1, self.OnTreectrl 1RightDown)
AttributeError: wxFrame1 instance has no attribute 'OnTreectrl1Rig htDown'
23:06:44: Debug: c:\PROJECTS\wx\ src\msw\app.cpp (439):
'UnregisterClas s(canvas)' failed with error 0x00000584 (class still has open
windows.).
this is the code have this code:
self.treeCtrl1 = wxTreeCtrl(id=w xID_WXFRAME1TRE ECTRL1, name='treeCtrl1 ',
parent=self.spl itterWindow1, pos=wxPoint(2, 2),
size=wxSize(200 ,
610), style=wxTR_HAS_ BUTTONS, validator=wxDef aultValidator)
self.treeCtrl1. SetFont(wxFont( 10, wxSWISS, wxNORMAL, wxNORMAL,
False,
'Microsoft Sans Serif'))
EVT_RIGHT_DOWN( self.treeCtrl1, self.OnTreectrl 1RightDown)
EVT_TREE_SEL_CH ANGED(self.tree Ctrl1, wxID_WXFRAME1TR EECTRL1,
self.OnTreectrl 1TreeSelChanged )
and the event EVT_RIGHT_DOWN code is:
def OnTreectrl1Righ tDown(self, event):
dosomething()
event.Skip()
the "OnTreectrl1Rig htDown" is in the wxframe class
what to do?
thanx in advance
wxpython code is made with boa-constructor
when i run the code i get this error message:
Traceback (most recent call last):
File "wxApp1.py" , line 24, in ?
main()
File "wxApp1.py" , line 20, in main
application = BoaApp(0)
File "K:\Python23\li b\site-packages\wxPyth on\wx.py", line 1945, in __init__
_wxStart(self.O nInit)
File "wxApp1.py" , line 13, in OnInit
self.main = wxFrame1.create (None)
File "wxFrame1.p y", line 12, in create
return wxFrame1(parent )
File "wxFrame1.p y", line 220, in __init__
self._init_ctrl s(parent)
File "wxFrame1.p y", line 157, in _init_ctrls
EVT_RIGHT_DOWN( self.treeCtrl1, self.OnTreectrl 1RightDown)
AttributeError: wxFrame1 instance has no attribute 'OnTreectrl1Rig htDown'
23:06:44: Debug: c:\PROJECTS\wx\ src\msw\app.cpp (439):
'UnregisterClas s(canvas)' failed with error 0x00000584 (class still has open
windows.).
this is the code have this code:
self.treeCtrl1 = wxTreeCtrl(id=w xID_WXFRAME1TRE ECTRL1, name='treeCtrl1 ',
parent=self.spl itterWindow1, pos=wxPoint(2, 2),
size=wxSize(200 ,
610), style=wxTR_HAS_ BUTTONS, validator=wxDef aultValidator)
self.treeCtrl1. SetFont(wxFont( 10, wxSWISS, wxNORMAL, wxNORMAL,
False,
'Microsoft Sans Serif'))
EVT_RIGHT_DOWN( self.treeCtrl1, self.OnTreectrl 1RightDown)
EVT_TREE_SEL_CH ANGED(self.tree Ctrl1, wxID_WXFRAME1TR EECTRL1,
self.OnTreectrl 1TreeSelChanged )
and the event EVT_RIGHT_DOWN code is:
def OnTreectrl1Righ tDown(self, event):
dosomething()
event.Skip()
the "OnTreectrl1Rig htDown" is in the wxframe class
what to do?
thanx in advance
Comment