I am trying to write a gui application using wx python and I need to control the interval of the timer event. Here is my code:
self.timer = wx.Timer(self)
self.Bind(wx.EVT_TIMER, self.on_timer, self.timer)
self.timer.Start(750)
This is the correct structure, but I cannot control the interval or frequency of EVT_TIMER. I tried to figure out using the wx TimerEvent class, but with no luck. I feel this should be what I need, but it doesn't work:
self.timer = wx.Timer(self)
self.timerEvent = wx.TimerEvent(self.timer.GetId(),10)
self.Bind(wx.EVT_TIMER, self.on_timer, self.timer)
Thank!
Kevin source
share