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?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Hirendra SisodiyaRank #256 · 9.8K pointsPosted Mar 22, 2010, 12:24 AM EDT
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