Fixed panel with scrollbar
As of now, i have a fixed size panel of 500, 500 on a windows form. I would like to have a scrollbar to appear if my background image is bigger that the panel size. How can i do that?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Hirendra SisodiyaPosted Mar 22, 2010, 4:24 AM
Hello Jason
i have another idea for performing this behaviour, we can label or other control,
and set the image. and write code on label paint event
private void label1_Paint(object sender, PaintEventArgs e)
{
panel1.AutoScroll=true;
label1.AutoSize = false;
label1.Size = label1.Image.Size;
}
thanks
Please mark as answere,if you like