Spinner Events in wxGTK

Hi,

A quick search couldn't find a mention of this problem so I thought I would raise it here. It seems that binding spin events (EVT_SPINCTRL, EVT_SPIN, EVT_SPIN_UP and EVT_SPIN_DOWN) doesn't work with wxPython 2.4.0.7 on Linux.

This was first spotted in PythonCard, but I've knocked a quick sample (see attachment). This works on Windows, printing out 'Current value of spin is ..." but produces nothing in the console window on my Linux box.

Environment : Debian testing, Python 2.2.2 and wxPython 2.4.0.7 (actually called libwxgtk2.4-python 2.4.0.8).

Thanks in advance,
Andy

wxSpin.py (1.08 KB)

···

--
--------------------------------------------------------------------------------
From the desk of Andrew J Todd esq - http://www.halfcooked.com/

Andy Todd wrote:

Hi,

A quick search couldn't find a mention of this problem so I thought I would raise it here. It seems that binding spin events (EVT_SPINCTRL, EVT_SPIN, EVT_SPIN_UP and EVT_SPIN_DOWN) doesn't work with wxPython 2.4.0.7 on Linux.

This was first spotted in PythonCard, but I've knocked a quick sample (see attachment). This works on Windows, printing out 'Current value of spin is ..." but produces nothing in the console window on my Linux box.

Environment : Debian testing, Python 2.2.2 and wxPython 2.4.0.7 (actually called libwxgtk2.4-python 2.4.0.8).

For me your sample does nothing on both wxMSW and wxGTK (2.4.1.2) but changing it to EVT_SPINCTRL works on both platforms, as it is supposed to.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Andy Todd wrote:

A quick search couldn't find a mention of this problem so I thought I
would raise it here. It seems that binding spin events (EVT_SPINCTRL,
EVT_SPIN, EVT_SPIN_UP and EVT_SPIN_DOWN) doesn't work with wxPython
2.4.0.7 on Linux.

al of those events, except EVT_SPINCTRL, are for wxSpinButton, not
wxSpinCtrl, which you are using. Using EVT_SPINCTRL works just fine for
me. Also, binding the event in the App is a bit strange. I moved it to
the frame which is probalbay a better place to put it. I"ve enclosed my
altered and functional version.

-CHB

wxSpin.py (1.03 KB)

···

--
Christopher Barker, Ph.D.
Oceanographer
                                        
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov