MouseWheel event not firing

A

aiKeith

Hello,

I have a winform UserControl that i created. It contains a flowlayoutpanel
that i want to enable scrolling on. I have tried attaching the event handler
to to this panel, to the usercontrol itself, etc., but the event never fires.

this.MouseWheel += new MouseEventHandler(RecentActivity_MouseWheel);
this.flowPanel.MouseWheel += new MouseEventHandler(RecentActivity_MouseWheel);

Any ideas?

tx :)
 
A

aiKeith

I was able to resolve this (finally) - the solution is simple but not
appearant.

1.) On The click event of the control you want to scroll (ie:
flowlayoutpanel), simply set focus to that control - thats it!

Even when clicking on the control or using the scrollbar, it was not
considered as 'having focus'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top