List of Events in wxPython

J

Jacksondf

What is that procedure for determining which events can be binded for a
particular widget? The docs don't seem to help. For example, how can I
know which events wx.SpinButton will send.

Thanks.
 
H

hg

Jacksondf said:
What is that procedure for determining which events can be binded for a
particular widget? The docs don't seem to help. For example, how can I
know which events wx.SpinButton will send.

Thanks.
from the doc:

To process input from a spin button, use one of these event handler macros
to direct input to member functions that take a wxSpinEvent argument:
EVT_SPIN(id, func)
Generated whenever an arrow is pressed.
EVT_SPIN_UP(id, func)
Generated when left/up arrow is pressed.
EVT_SPIN_DOWN(id, func)
Generated when right/down arrow is pressed.
Note that if you handle both SPIN and UP or DOWN events, you will be
notified about each of them twice: first the UP/DOWN event will be
receieved and then, if it wasn't vetoed, the SPIN event will be sent. See
also

hg
 
J

John Salerno

Jacksondf said:
What is that procedure for determining which events can be binded for a
particular widget? The docs don't seem to help. For example, how can I
know which events wx.SpinButton will send.

Thanks.

Exactly which docs are you looking at? The wxPython docs have a link
that lists all the classes, just scroll down to that particular class
and it lists the events, like hg posted.
 
J

Jacksondf

John wrote the following on 12/07/2006 09:39 AM:
Exactly which docs are you looking at? The wxPython docs have a link
that lists all the classes, just scroll down to that particular class
and it lists the events, like hg posted.

Strange. I was looking at:

http://www.wxpython.org/docs/api/wx.SpinButton-class.html

And this page definitely does not show what hg posted. Apparently, I
should not refer to the wxPython specific docs, but instead go directly
to the original wx.

http://www.wxwidgets.org/manuals/2.6.3/wx_wxspinbutton.html

My mistake.
 
Joined
Aug 29, 2012
Messages
1
Reaction score
0
$ python
>>> import wx
>>> print '\n'.join(a for a in dir(wx) if a.startswith('EVT_'))

or, if your at a bash terminal, you could alias this:

alias wx_events='python -c "import wx; print \"\n\".join(a for a in dir(wx) if a.startswith(\"EVT_\"))" | column'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,826
Members
47,372
Latest member
LucretiaFo

Latest Threads

Top