Hi,
I have a panel on a form and am displaying a picturebox on that panel.
I have set the Panel Autoscroll to true.
Even when I manually make the panel smaller than the picturebox, no scrollbars are shown, why is this?
Here is the code I am using to display the picturebox:-
void MainFormLoad(object sender, EventArgs e)
{
PictureBox pb = new PictureBox();
pb.Parent = panel1;
pb.Location = new Point(20, 18);
pb.Size = new Size(75, 75);
pb.BorderStyle = BorderStyle.Fixed3D;
pb.ImageLocation = "http://farm5.static.flickr.com/.jpg";
pb.Cursor = System.Windows.Forms.Cursors.Hand;
this.Controls.Add(pb);
pb.BringToFront();
pb.Click += delegate(object s, EventArgs e2)
{
System.Diagnostics.Process.Start("http://www.flickr.com/photos/");
};
}
As you can see, the panel has been set as the parent of the picturebox.
I have a feeling that it is possibly the pb.BringToFront that might be the issue but if I remove that the picturebox appears behind the panel.
Regards..,
MT ;)