File: standard_event_identifiers.rst

package info (click to toggle)
wxpython4.0 4.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 221,752 kB
  • sloc: cpp: 962,555; python: 230,573; ansic: 170,731; makefile: 51,756; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (33 lines) | stat: -rw-r--r-- 1,224 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.. include:: headings.inc


.. _standard event identifiers:

===============================================
|phoenix_title|  **Standard event identifiers**
===============================================

wxPython defines a special identifier value ``wx.ID_ANY`` (-1) which is
used in the following two situations:

- When creating a new window you may specify ``wx.ID_ANY`` to let
  wxPython assign an unused identifier to it automatically

- When installing an event handler using :meth:`EvtHandler.Bind`, you
  may use it to indicate that you want to handle the events coming
  from any control, regardless of its identifier


Another standard special identifier value is ``wx.ID_NONE``: this is a
value which is not matched by any other id.

wxPython also defines a few standard command identifiers which may be
used by the user code and also are sometimes used by wxPython
itself. These reserved identifiers are all in the range between
``wx.ID_LOWEST`` and ``wx.ID_HIGHEST`` and, accordingly, the user code
should avoid defining its own constants in this range (e.g. by using
:func:`wx.NewIdRef` ()).

Refer to :ref:`the list of stock items <stock items>` for the subset
of standard IDs which are stock IDs as well.