1
DotNet / Mouse wheel events not firing
« on: March 24, 2015, 07:09:05 pm »
I'm using the .NET bindings in a C# winforms app, and actually drawing onto a panel. Mouse clicked events work fine, but scroll events never fire.
My setup code is simply
My main loop calls both System.Windows.Forms.Application.DoEvents() and m_renderWindow.DispatchEvents(). And as I said, clicks work fine...
My setup code is simply
// windowHandle is the handle of the panel we're drawing to
m_renderWindow = new RenderWindow(windowHandle,
new ContextSettings { AntialiasingLevel = 8 });
m_renderWindow.Resized += (sender, args) => UpdateViewSize();
m_renderWindow.MouseWheelMoved +=
(sender, args) => Log.Info("mouse scrolled");
m_renderWindow.MouseButtonPressed +=
(sender, args) => Log.Info("mouse clicked");
m_renderWindow = new RenderWindow(windowHandle,
new ContextSettings { AntialiasingLevel = 8 });
m_renderWindow.Resized += (sender, args) => UpdateViewSize();
m_renderWindow.MouseWheelMoved +=
(sender, args) => Log.Info("mouse scrolled");
m_renderWindow.MouseButtonPressed +=
(sender, args) => Log.Info("mouse clicked");
My main loop calls both System.Windows.Forms.Application.DoEvents() and m_renderWindow.DispatchEvents(). And as I said, clicks work fine...