Creating the timer

To create a timer, first create a wx.Timer instance using this constructor.

wx.Timer(owner=None, id=-1)

The owner parameter is some instance implementing wx.EvtHandler, meaning any wxPython widget or anything else that can receive event notifications. The optional id is used to differentiate this particular timer from any others. If it is not specified, wxPython will generate an ID number for you. If you don't want to set the owner and ID parameters when you create the timer, you can do so at any time using the method SetOwner(owner=None, id=-1), which sets the same two parameters.

Was this article helpful?

0 0

Post a comment