On Sun, May 10, 2009 at 1:55 PM, lostgallifreyan
<lostgallifre...@gmail.com>wrote:

> How do I stop mousewheel events from scrolling the window?
>
> I went to absurd lengths, connecting to everything in sight all at once,
> the code didn't protest but still the wretched scroller scrolleth...
>
>  FRAME:Connect(wx.wxEVT_MOUSEWHEEL,function()  end)
>  SCROLL:Connect(wx.wxEVT_MOUSEWHEEL,function()  end)
>  LAYER:Connect(wx.wxEVT_MOUSEWHEEL,function()  end)
>  PANEL:Connect(wx.wxEVT_MOUSEWHEEL,function()  end)
>
> I thought that kind of handling was supposed to intercept the event and
> tell it to do nothing, but I have no idea what to connect it to, as it's
> acting as if there are mouseholes all along the skirtingboard and I can't
> stop the mouse.
>
> At some point I'd like to catch scrollwheel events for specific purposes
> too, so this is really important to me.
>

I don't believe that you can you can stop the mouse wheel from scrolling a
wxScrolledWindow, but you might want to call event:Skip(false) just to be
sure.

If you want complete control over the scrolled window I suggest using two
wxScrollBars and a wxPanel inside of a sizer. This way you can
programmatically set what happens for any type of input and not try to fight
against the native behavior.

Regards,
    John
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to