GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Table of Contents
  • wx.TimerEvent
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx

This view

  • Original page
  • New address

GeezerVison is showing docs.wxpython.org — wx.TimerEvent — wxPython 4.3.2 Docs

phoenix_title wx.TimerEvent¶

wx.TimerEvent object is passed to the event handler of timer events (see wx.Timer.SetOwner ).

For example:

class MyFrame(wx.Frame):

    def __init__(self, parent):

        wx.Frame.__init__(self, parent)

        self.timer = wx.Timer(self, TIMER_ID)
        self.Bind(wx.EVT_TIMER, self.OnTimer)

        self.timer.Start(1000)    # 1 second interval


    def OnTimer(self, event):

        # do whatever you want to do every second here
        print('Hello')

See also

wx.Timer


class_hierarchy Class Hierarchy¶

Inheritance diagram for class TimerEvent:

Inheritance diagram of TimerEvent


method_summary Methods Summary¶

__init__

GetInterval

Returns the interval of the timer which generated this event.

GetTimer

Returns the timer object which generated this event.


property_summary Properties Summary¶

Interval

See GetInterval

Timer

See GetTimer


api Class API¶

class wx.TimerEvent(Event)¶

Possible constructors:

TimerEvent(timer) -> None

TimerEvent object is passed to the event handler of timer events (see Timer.SetOwner).


Methods¶

__init__(self, timer)¶
Parameters:

timer (wx.Timer)

Return type:

None



GetInterval(self)¶

Returns the interval of the timer which generated this event.

Return type:

int



GetTimer(self)¶

Returns the timer object which generated this event.

Return type:

wx.Timer


Properties¶

Interval¶

See GetInterval



Timer¶

See GetTimer

© Copyright 2012-2026, The wxPython Team. Created using Sphinx 9.1.0 and the python-docs-theme.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.