MouseWheel method in wxPython?

Hello,

Anyone knows why there is no method for MouseWheel in wxPython? The equivalent to

MiddleDown(self) but for the mouse wheel. Note I’m not looking for EVT_MOUSEWHEEL. I want to use the method for a motion event such as

if MiddleDown():

DoSomething()

Also I tried this but it does not work

if (evt.GetWheelRotation() > 0):

DoSomething()

Any alternative?

What happens if you try EVT_MOUSE_AUX1_DOWN or
EVT_MOUSE_AUX2_DOWN?

···

On Wed, Jan 20, 2016 at 9:41 PM, Emad Dlala <emad.dlala@gmail.com> wrote:

Hello,

Anyone knows why there is no method for MouseWheel in wxPython? The
equivalent to
MiddleDown(self) but for the mouse wheel.

On MacOS, Windows and Ubuntu i use EVT_MOTION for tracking movement for any button.
self.CaptureMouse() can help too.
HTH

Niki

···

On 21.01.2016 04:41, Emad Dlala wrote:

Hello,

Anyone knows why there is no method for MouseWheel in wxPython? The
equivalent to
MiddleDown(self) but for the mouse wheel. Note I'm not looking for
EVT_MOUSEWHEEL. I want to use the method for a motion event such as

Hi Guys,

Thanks for the feedback. I found a solution to do dynamic zoom through EVT_MOUSEWHEEL and GetWheelRotation. My example looks like this

def OnWheelScroll(self, evt):

if evt.GetWheelRotation() > 0:

zoom_factor = 2

else:

zoom_factor = 0.5

self._display.Repaint()

self._display.ZoomFactor(zoom_factor)

···

On Wednesday, January 20, 2016 at 7:37:40 PM UTC-8, Che M wrote:

On Wed, Jan 20, 2016 at 9:41 PM, Emad Dlala emad....@gmail.com wrote:

Hello,

Anyone knows why there is no method for MouseWheel in wxPython? The equivalent to

MiddleDown(self) but for the mouse wheel.

What happens if you try EVT_MOUSE_AUX1_DOWN or
EVT_MOUSE_AUX2_DOWN?