File: standard_event_identifiers.rst

package info (click to toggle)
wxpython4.0 4.0.7%2Bdfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 210,992 kB
  • sloc: cpp: 888,989; python: 226,808; makefile: 52,078; ansic: 45,837; sh: 3,014; xml: 1,534; javascript: 436; perl: 264
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.