I am adding to a MDI a side bar form (not a child) and docking it to the right. The top of the side bar appears to overlapping the toolbar. When doing a manual resizing (by dragging), the side bar is "magically" looks fine.
Before resizing:
After Resizing:
public partial class MDI : Form
{
private void InitGenealogicalTree()
{
var form = new GenealogicalTreeForm();
form.TopLevel = false;
form.WindowState = FormWindowState.Normal;
form.Dock = DockStyle.Right;
this.Controls.Add(form);
}
}
Note: The ToolStrip was added in design mode.
How can I properly add the side bar form without having it overlapping the toolbar?