How do I add scrolling to a derived Panel?

Hi,

I have inherited a DiagramPanel from Windows.Forms.Panel class. I have my own painting logic to display my diagram. I have added my panel to a form and its size is 100, 100 and my diagram size is 100, 400 (computed programmatically). I want to show vertical scrollbar to my DiagramPanel and let the user scroll.

I have enabled AutoScroll=true for my panel. Where do I set that my diagram size is 100,400 and I want to display a vertical scrollbar.

Any pointers or examples would be appreciated.

Thanks,
- Reddy

[526 byte] By [codefund.com] at [2007-12-16]
# 1
Set the AutoScrollMinSize property on your panel.

Have a nice day,
Robert W. Grubbs

codefund.com at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Designer...