internal bool IsPanelLast(ListBoxPanel panel) { if (m_Panels.Count == 0) { return(false); } return(m_Panels[m_Panels.Count - 1] == panel); }
private void tableLayout_ControlRemoved(object sender, ControlEventArgs e) { ListBoxPanel panel = e.Control as ListBoxPanel; if (panel != null) { m_Panels.Remove(panel); } }
protected void OnPanelAdd(ListBoxPanel panel) { panel.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right; this.tableLayout.Controls.Add(panel); // New rows will automatically be created panel.Width = Width; panel.DoubleClick += new EventHandler(OnPanelDoubleClick); // Prevent flicker and the like using (new ControlRedrawLock(this.Parent)) { // Brute force scrollbar update this.Width += 1; this.Width -= 1; } }
public ItemChosenEventArgs(ListBoxPanel panel) { m_Panel = panel; }
internal bool IsPanelLast(ListBoxPanel panel) { if (m_Panels.Count == 0) return false; return m_Panels[m_Panels.Count - 1] == panel; }
protected void OnPanelRemove(ListBoxPanel panel) { this.tableLayout.Controls.Remove(panel); Invalidate(); }
private void m_Panels_PanelAdded(object sender, EventArgs e) { ListBoxPanel panel = sender as ListBoxPanel; OnPanelAdd(panel); }