How do I add scrollbars?

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?
 
C

Carsten Klotz

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
 
C

Carsten Klotz

Sorry, I ment:

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

Carsten Klotz

Sorry, I ment:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top