public void RecreateSectionsUI() { flowLayoutPanelSections.Controls.Clear(); int totalSections = Project.Sections.GetAll().Count; for (int i = 0; i < totalSections; i++) { Section s = Project.Sections[i]; SectionControl sc = new SectionControl(Project, s, this, (i == totalSections - 1)); sc.Width = 147; sc.Height = flowLayoutPanelSections.Height; flowLayoutPanelSections.Controls.Add(sc); flowLayoutPanelSections.SetFlowBreak(sc, true); } }
public void RecreateSectionsUI() { flowLayoutPanelSections.Controls.Clear(); int totalSections = Project.Sections.GetAll().Count; for (int i = 0; i < totalSections; i++) { Section s = Project.Sections[i]; SectionControl sc = new SectionControl(Project, s, this, (i == totalSections - 1)); sc.Width = 147; //modified by Tom Cook //sc.Height = flowLayoutPanelSections.Height; //sc.Height = flowLayoutPanelSections.Height - 21; sc.Height = 239; //Train Driving Module to shrinks the Section control flowLayoutPanelSections.Controls.Add(sc); flowLayoutPanelSections.SetFlowBreak(sc, true); } }