Hello bern11,
>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....
Well, this seems kind of the right way to me though :-) Hard way? Well,
you're doing something non-standard, so you first have to find a way to
get rid of the standard behaviour, and stealing away the event is often a
good way of doing that.
>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.
Have a look at Reflector - it shows you that the setter for the
AutoScrollMinSize property looks like this:
set
{
if (value != this.userAutoScrollMinSize)
{
this.userAutoScrollMinSize = value;
this.AutoScroll = true;
base.PerformLayout();
}
}
So, it definitely looks like the programmer wanted AutoScroll to be set to
true in this case.
>PPS. Why doesn't MouseWheel event show up in the designer? I had to type
>the whole thing in, delegate declaration and all.
Because it's marked [Browsable(false)] on the Control (once more, see
Reflector). Oh, why did they do that? I don't know. Maybe it's a mistake,
or they had a genuine reason not to expose the event - I couldn't find
much useful info about this.
Oliver Sturm

Signature
http://www.sturmnet.org/blog