FloatSpin and MacOSX - cannot spin with mouse wheel or scroll

Well, the subject [retty much says it all. In my program, I can use
the mouse wheel or scrolling with the touchpad to change the values on
a FloatSpin if running on Linux or Windows. On a Mac, I can't..

thanks for any input into this

Carlos

I don't think that wx does anything extra to support this, so it is probably just a matter of whether the native widgets provides the feature or not.

···

On 7/23/11 2:36 PM, Carlos Grohmann wrote:

Well, the subject [retty much says it all. In my program, I can use
the mouse wheel or scrolling with the touchpad to change the values on
a FloatSpin if running on Linux or Windows. On a Mac, I can't..

--
Robin Dunn
Software Craftsman

HI,

Well, the subject [retty much says it all. In my program, I can use
the mouse wheel or scrolling with the touchpad to change the values on
a FloatSpin if running on Linux or Windows. On a Mac, I can't..

I don't think that wx does anything extra to support this, so it is probably
just a matter of whether the native widgets provides the feature or not.

Well, FloatSpin is a subclass of wx.PyControl, and I am binding the
mouse wheel event like this:

self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel)

I thought wx.PyControl behaviour was independent from the platform...
Anyway, in this case it looks like the mouse wheel events are not
passed to the FloatSpin event handler or something else is eating the
event before it reaches FloatSpin. I have no Mac, so I am not sure how
I can fix this thing. Is it possible that wx.TextCtrl and/or
wx.SpinCtrl (the 2 widgets which make up FloatSpin) are eating the
mouse wheel event and not passing it to the parent window (FloatSpin)?

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.
The Doomed City: Removal Group: the nightmare <==

···

On 24 July 2011 01:30, Robin Dunn wrote:

On 7/23/11 2:36 PM, Carlos Grohmann wrote:

^^^^^^^^^^^^^

Sorry, I meant wx.SpinButton.

Andrea.

···

On 24 July 2011 01:47, Andrea Gavana wrote:

HI,

On 24 July 2011 01:30, Robin Dunn wrote:

On 7/23/11 2:36 PM, Carlos Grohmann wrote:

Well, the subject [retty much says it all. In my program, I can use
the mouse wheel or scrolling with the touchpad to change the values on
a FloatSpin if running on Linux or Windows. On a Mac, I can't..

I don't think that wx does anything extra to support this, so it is probably
just a matter of whether the native widgets provides the feature or not.

Well, FloatSpin is a subclass of wx.PyControl, and I am binding the
mouse wheel event like this:

self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel)

I thought wx.PyControl behaviour was independent from the platform...
Anyway, in this case it looks like the mouse wheel events are not
passed to the FloatSpin event handler or something else is eating the
event before it reaches FloatSpin. I have no Mac, so I am not sure how
I can fix this thing. Is it possible that wx.TextCtrl and/or
wx.SpinCtrl (the 2 widgets which make up FloatSpin)

HI,

Well, the subject [retty much says it all. In my program, I can use
the mouse wheel or scrolling with the touchpad to change the values on
a FloatSpin if running on Linux or Windows. On a Mac, I can't..

I don't think that wx does anything extra to support this, so it is probably
just a matter of whether the native widgets provides the feature or not.

Well, FloatSpin is a subclass of wx.PyControl,

Oops, I didn't think that through and just assumed he was talking about one of the wx spin widgets.

and I am binding the
mouse wheel event like this:

self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel)

I thought wx.PyControl behaviour was independent from the platform...
Anyway, in this case it looks like the mouse wheel events are not
passed to the FloatSpin event handler or something else is eating the
event before it reaches FloatSpin. I have no Mac, so I am not sure how
I can fix this thing. Is it possible that wx.TextCtrl and/or
wx.SpinCtrl (the 2 widgets which make up FloatSpin) are eating the
mouse wheel event and not passing it to the parent window (FloatSpin)?

I don't think that wheel events should be propagating. Do you not bind the handlers to the textctrl and spin button?

···

On 7/23/11 3:47 PM, Andrea Gavana wrote:

On 24 July 2011 01:30, Robin Dunn wrote:

On 7/23/11 2:36 PM, Carlos Grohmann wrote:

--
Robin Dunn
Software Craftsman

Hi Robin,

HI,

Well, the subject [retty much says it all. In my program, I can use
the mouse wheel or scrolling with the touchpad to change the values on
a FloatSpin if running on Linux or Windows. On a Mac, I can't..

I don't think that wx does anything extra to support this, so it is
probably
just a matter of whether the native widgets provides the feature or not.

Well, FloatSpin is a subclass of wx.PyControl,

Oops, I didn't think that through and just assumed he was talking about one
of the wx spin widgets.

and I am binding the
mouse wheel event like this:

self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel)

I thought wx.PyControl behaviour was independent from the platform...
Anyway, in this case it looks like the mouse wheel events are not
passed to the FloatSpin event handler or something else is eating the
event before it reaches FloatSpin. I have no Mac, so I am not sure how
I can fix this thing. Is it possible that wx.TextCtrl and/or
wx.SpinCtrl (the 2 widgets which make up FloatSpin) are eating the
mouse wheel event and not passing it to the parent window (FloatSpin)?

I don't think that wheel events should be propagating. Do you not bind the
handlers to the textctrl and spin button?

No, up to now I'm binding them to FloatSpin directly, and they work on
Windows and Linux... Anyway, I have just committed a fix in SVN in
which the mouse wheel event is bound to both the underlying widgets. I
can't test it on Mac so I don't know if the fix will work. Hopefully
it will not break on Linux. On Windows 7 it appears to be working
fine.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.
The Doomed City: Removal Group: the nightmare <==

···

On 24 July 2011 02:03, Robin Dunn wrote:

On 7/23/11 3:47 PM, Andrea Gavana wrote:

On 24 July 2011 01:30, Robin Dunn wrote:

On 7/23/11 2:36 PM, Carlos Grohmann wrote:

It works on OSX too, at least for wxPython 2.8.

···

On 7/23/11 4:27 PM, Andrea Gavana wrote:

No, up to now I'm binding them to FloatSpin directly, and they work on
Windows and Linux... Anyway, I have just committed a fix in SVN in
which the mouse wheel event is bound to both the underlying widgets. I
can't test it on Mac so I don't know if the fix will work. Hopefully
it will not break on Linux. On Windows 7 it appears to be working
fine.

--
Robin Dunn
Software Craftsman

It worked perfectly on my Mac.

Manny thanks!

···

On Jul 23, 10:02 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 7/23/11 4:27 PM, Andrea Gavana wrote:

> No, up to now I'm binding them to FloatSpin directly, and they work on
> Windows and Linux... Anyway, I have just committed a fix in SVN in
> which the mouse wheel event is bound to both the underlying widgets. I
> can't test it on Mac so I don't know if the fix will work. Hopefully
> it will not break on Linux. On Windows 7 it appears to be working
> fine.

It works on OSX too, at least for wxPython 2.8.

--
Robin Dunn
Software Craftsmanhttp://wxPython.org

Also worked fine on Linux (Ubuntu 10.10)

cheers

···

On 23 jul, 22:02, Robin Dunn <ro...@alldunn.com> wrote:

On 7/23/11 4:27 PM, Andrea Gavana wrote:

> No, up to now I'm binding them to FloatSpin directly, and they work on
> Windows and Linux... Anyway, I have just committed a fix in SVN in
> which the mouse wheel event is bound to both the underlying widgets. I
> can't test it on Mac so I don't know if the fix will work. Hopefully
> it will not break on Linux. On Windows 7 it appears to be working
> fine.

It works on OSX too, at least for wxPython 2.8.

--
Robin Dunn
Software Craftsmanhttp://wxPython.org