|
Hi All,
I developed a component for
which I use the MouseWheel event to implement a zoom function (and not scroll at all).
Originally, my component derived from System.Windows.Forms.Form ; and
everything was good.
Later, I decided i wanted to host the
component inside of a SplitContainer, and since SplitContainer won't
take a form directly, I converted the component to inherit Control instead of form. This control is the only control in one of the splitcontainer panels, and has DockStyle = Fill.
Everything
works fine, except that the MouseWheel event is never fired. If i add
a handler for the form's MouseWheel event, that is fired, and the SplitContainer gets it too, and also the Panel, but my control
never receives the message.
I can't see any reason for this in
MSDN - all the components in the hierarchy are documented as having the MouseWheel event. Anyone got any ideas or pointers on how i can have my control
receive the mouse wheel scroll messages?
I know I could implement a hack of some sort and pass the message from one of the windows that does get it, but this goes against the ideas of code reuse and compartmenization.
Thanks
Jon
|