I use some code to add Objects to Controls List of a FlowLayoutPanel. When the controls get added, the vertical scroll bar appears (if necessary) as I set AutoScroll to True.
I also have this event handler:
private void Form1_Resize(object sender, EventArgs e)
{
resultsFlow.Width = this.Width - resultsFlow.Left;
resultsFlow.Height = querySetupPanel.Height = this.Height;
}
When I resize my form, the scroll bar disappears regardless of content's height being more than panel's height.
I tried setting minimum and maximum size for both my Form and my panel as suggested in a similar question, but that doesn't work with mine.
Also, when I restore my window from Maximum state to normal, sometimes panel's content don't get repositioned properly.
I'm pretty sure I'm resizing the panels correctly based on the positioning.
Does anyone has any idea what is going on?