private bool ResetDisplayPanel() { bool controlVisible = false; foreach (Control ctrl in TLP_Main.Controls) { FlowLayoutPanel panel = ctrl as FlowLayoutPanel; if (panel != null && ctrl.Tag != null && ctrl.Tag.ToString() == "DisplayForm" && ctrl.Visible) { ctrl.Visible = false; TLP_Main.Refresh(); LBL_MainText.Text = ""; controlVisible = true; } } return(controlVisible); }
private void FlowLayoutPanel_Resize(object sender, EventArgs e) { FlowLayoutPanel flp = sender as FlowLayoutPanel; if (flp.ClientSize == new Size(0, 0) || flp.Controls.Count <= 0) { return; } flp.SuspendLayout(); TableLayoutPanelCellPosition pos = TLP_Main.GetCellPosition(flp); int width = TLP_Main.GetColumnWidths()[pos.Column]; int height = TLP_Main.GetRowHeights()[pos.Row]; Size size = new Size(width, height); flp.Controls[0].ClientSize = size; flp.ResumeLayout(); }