/// ------------------------------------------------------------------------------------ /// <summary> /// Adds an ExplorerBarItem with the specified text and hosting the specified control. /// </summary> /// ------------------------------------------------------------------------------------ public ExplorerBarItem Add(Control control) { var item = new ExplorerBarItem(null, control); Add(item); return(item); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Removes the specified item from the collection of items. /// </summary> /// ------------------------------------------------------------------------------------ public void Remove(ExplorerBarItem item) { if (item != null && m_items.Contains(item)) { Controls.Remove(item); m_items.Remove(item); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Adds the specified item to the item collection. /// </summary> /// ------------------------------------------------------------------------------------ public void Add(ExplorerBarItem item) { item.Dock = DockStyle.Top; item.BackColor = BackColor; m_items.Add(item); Controls.Add(item); item.BringToFront(); item.Collapsed += item_SizeChanged; item.Expanded += item_SizeChanged; }