How To Maintain FlowLayoutPanel Focus for MouseWheel Scrolling

Viewed 81

I have a flowlayoutpanel that adds richtextbox controls filled with data. These controls are automatically set to "Read Only = True" and are autosized, with no visible scrollbars.

The problem I have is that if I try to use my mousewheel to scroll down the flowlayoutpanel, and my cursor touches a richtextbox, the richtextbox steals focus and prevent further scrolling on the flowlayoutpanel.

I have Googled answers and I have tried them all. Including setting focus of flowlayoutpanel within the mouseenter event, click event, and gotfocus event of the richtextbox. Including sending a mousewheel message from the richtextbox to the flowlayoutpanel. None of this works.

The only thing that does work is disabling the richtextbox but this is not a viable solution because it removes the ability to add colors to the richtextbox which is vital.

Is there any way to prevent a richtextbox from stealing focus of the parent flowlayoutpanel?

0 Answers
Related