Skip to content

Fixed panel with scrollbar

Jason

Asked Mar 21, 2010, 11:47 AM EDT1 answer
Share
LinkedInX
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 Sisodiya
    0
    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
    0