python可以响应内部或者预定义的事件:
self.Bind( wx.EVT_PAINT, self.OnPaint )
def OnPaint( self, evt ):
# do something here
除此之外,我们开可以自定义事件:
import wx
import wx.lib.newevent
MyEvent, EVT_SOME_NEW_EVENT = wx.lib.newevent.NewEvent()
MyCom… 更多... “python中自定义事件”