.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.PyEvent:
==========================================================================================================================================
|phoenix_title| **wx.PyEvent**
==========================================================================================================================================
:class:`PyEvent` can be used as a base class for implementing custom
event types in Python. You should derive from this class instead
of :class:`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 :class:`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.
.. seealso:: :class:`PyCommandEvent`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
PyEvent:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.PyEvent.__init__`
:meth:`~wx.PyEvent.Clone` Make a new instance of the event that is a copy of self.
:meth:`~wx.PyEvent.__delattr__`
:meth:`~wx.PyEvent.__getattr__`
:meth:`~wx.PyEvent.__setattr__`
:meth:`~wx.PyEvent._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: int=0, eventType: EventType=wxEVT_NULL) -> None
:class:`PyEvent` can be used as a base class for implementing custom
event types in Python. You should derive from this class instead
of :class:`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 :class:`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.
.. seealso:: :class:`PyCommandEvent`
.. method:: __init__(self, id: int=0, eventType: EventType=wxEVT_NULL)
:param `id`:
:type `id`: int
:param `eventType`:
:type `eventType`: wx.EventType
:rtype: `None`
.. method:: 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.
.. method:: __delattr__(self, name : Any)
:param `name`:
:type `name`: PyObject
:rtype: `None`
.. method:: __getattr__(self, name : Any)
:param `name`:
:type `name`: PyObject
:rtype: `Any`
.. method:: __setattr__(self, name : Any, value : Any)
:param `name`:
:type `name`: PyObject
:param `value`:
:type `value`: PyObject
:rtype: `None`
.. method:: _getAttrDict(self)
Gives access to the internal object that is tracking the event's python attributes.
:rtype: `Any`