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.PyEvent
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx

This view

  • Original page
  • New address

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

phoenix_title wx.PyEvent¶

PyEvent can be used as a base class for implementing custom event types in Python. You should derive from this class instead of Event because this class is Python-aware and is able to transport its Python bits safely through the wxWidgets event system and have them still be there when the event handler is invoked. Note that since PyEvent is taking care of preserving the extra attributes that have been set then you do not need to override the Clone method in your derived classes.

See also

PyCommandEvent


class_hierarchy Class Hierarchy¶

Inheritance diagram for class PyEvent:

Inheritance diagram of PyEvent


method_summary Methods Summary¶

__init__

Clone

Make a new instance of the event that is a copy of self.

__delattr__

__getattr__

__setattr__

_getAttrDict

Gives access to the internal object that is tracking the event’s python attributes.


api Class API¶

class wx.PyEvent(Event)¶

Possible constructors:

PyEvent(id=0, eventType=wxEVT_NULL) -> None

PyEvent can be used as a base class for implementing custom event types in Python. You should derive from this class instead of Event because this class is Python-aware and is able to transport its Python bits safely through the wxWidgets event system and have them still be there when the event handler is invoked. Note that since PyEvent is taking care of preserving the extra attributes that have been set then you do not need to override the Clone method in your derived classes.

See also

PyCommandEvent


Methods¶

__init__(self, id=0, eventType=wxEVT_NULL)¶
Parameters:
  • id (int)

  • eventType (wx.EventType)

Return type:

None



Clone(self)¶

Make a new instance of the event that is a copy of self.

Through the magic of Python this implementation should work for this and all derived classes.



__delattr__(self, name)¶
Parameters:

name (PyObject)

Return type:

None



__getattr__(self, name)¶
Parameters:

name (PyObject)

Return type:

Any



__setattr__(self, name, value)¶
Parameters:
  • name (PyObject)

  • value (PyObject)

Return type:

None



_getAttrDict(self)¶

Gives access to the internal object that is tracking the event’s python attributes.

Return type:

Any

© 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.