phoenix_title wx.PyCommandEvent

PyCommandEvent can be used as a base class for implementing custom event types in Python. You should derive from this class instead of CommandEvent 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 PyCommandEvent 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

PyEvent


class_hierarchy Class Hierarchy

Inheritance diagram for class PyCommandEvent:

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.PyCommandEvent(CommandEvent)

Possible constructors:

PyCommandEvent(eventType=wxEVT_NULL, id=0)

PyCommandEvent can be used as a base class for implementing custom event types in Python. You should derive from this class instead of CommandEvent 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 PyCommandEvent 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

PyEvent


Methods

__init__(self, eventType=wxEVT_NULL, id=0)
Parameters
  • eventType (wx.EventType) –

  • id (int) –



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) –



__getattr__(self, name)
Parameters

name (PyObject) –

Return type

PyObject



__setattr__(self, name, value)
Parameters
  • name (PyObject) –

  • value (PyObject) –



_getAttrDict(self)

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

Return type

PyObject