B
bern11
I have an panel containing an image which creates scrollbars if the
image is too large for the panel. MouseWheel events automatically
scroll the scroll-bars. How do I intercept the mouse-wheel and make it
perform another function? I added a delegate mousewheel handler, but
now I get both events (panel scroll plus intended new function). I want
to switch between functions based on a flag.
I've already sub-classed the panel to gain access to other properties,
should I simply over-ride the mousewheel event and call the base event
based on a flag setting? Seems kindof the hard way....
PS. I also just noticed I never set the autoscroll property to true,
but the autoscrollbar behaviour seems to be enabled when I set the
autoscrollminsize property. Is this supposed to happen or did I just
get lucky and my code might not always work.
PPS. Why doesn't MouseWheel event show up in the designer? I had to
type the whole thing in, delegate declaration and all.
image is too large for the panel. MouseWheel events automatically
scroll the scroll-bars. How do I intercept the mouse-wheel and make it
perform another function? I added a delegate mousewheel handler, but
now I get both events (panel scroll plus intended new function). I want
to switch between functions based on a flag.
I've already sub-classed the panel to gain access to other properties,
should I simply over-ride the mousewheel event and call the base event
based on a flag setting? Seems kindof the hard way....
PS. I also just noticed I never set the autoscroll property to true,
but the autoscrollbar behaviour seems to be enabled when I set the
autoscrollminsize property. Is this supposed to happen or did I just
get lucky and my code might not always work.
PPS. Why doesn't MouseWheel event show up in the designer? I had to
type the whole thing in, delegate declaration and all.