Hi, all
I found that wx.EVT_WINDOW_CREATE of wx.Dialog can not be handled. You can try my code here. And I use python2.4, wxpython2.6.3.2. Is this a bug?
···
#========================================
import wx
class MyDialog(wx.Dialog):
def __init__(self, *args, **kwds):
wx.Dialog.__init__(self, *args, **kwds)
self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)
print '__init__'
def OnCreate(self, evt):
#why is OnCreate not called?
print 'OnCreate'
def main():
app = wx.PySimpleApp(0)
dlg = MyDialog(None, -1, title = '')
dlg.ShowModal()
app.SetTopWindow(dlg)
app.MainLoop()
if __name__ == "__main__":main()
#========================================
bruce.who.hk
2006-09-11