I have a Form, inside the Form there is a Panel.
I would like the Panel to Fill the Form, but only if the Form is bigger then a minimum size.
Till this point it is already working.
When the Form is smaller then the Panel, I would like to have scrollbars. This is not working.
I set the AutoScroll in the form. The scrollbars working only if the Panel has a fixed size and the Form is smaller. If I set the Panel to Fill the form and set the minimum size, the scrollbars not appearing.
The following code snippet is from InitializeComponent of the Form
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.MinimumSize = new System.Drawing.Size(250, 250);
this.AutoScroll = true;
In the picture you can see that the Panel is bigger then the Form, but there is no scrollbar.