How do I add scrollbars?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have extended a Panel control and overrided the onPaint event so I can do
my own drawings. Now the problem is when I draw things beyond the clip area I
do not know how to activate scrollbars on the Panel... any ideas?
 
Am Fri, 30 Sep 2005 13:05:03 -0700 schrieb MrNobody:
I have extended a Panel control and overrided the onPaint event so I can do
my own drawings. Now the problem is when I draw things beyond the clip area I
do not know how to activate scrollbars on the Panel... any ideas?

I'm not sure (because new in C#), but this seems to be impossible. You can
use scrollbars, if you add other controls (a child) onto a panel (a
parent), which exceed the bounds of it.

Place your overwritten panel object i.e. called panel2 onto a another panel
panel1 (it acts as parent of panel2) an set panel2's property
"AutoScroll=true". That should answer your question.

Remember: Without guaranty :-)

Best regards,

Carsten
 
Sorry, I ment:

....and set panel1's (not parent2's property) property "AutoScroll=true"
 
Sorry, I ment:

....and set panel1's (not parent2's property) property "AutoScroll=true"
 
Back
Top