private void m_Items_InsertItem(TuxBarItem item, int index) { item.Theme = m_TuxTheme; item.Resize += new EventHandler(item_Resize); item.Toogle += new EventHandler(item_Toogle); this.Controls.RemoveAt(index); AlignControls(); }
public void Insert(int index, TuxBarItem value) { m_List.Insert(index,value); if(InsertItem != null) InsertItem(value,index); if(LayoutChanged != null) LayoutChanged(value,new EventArgs()); value.Toogle+=new EventHandler(LayoutChanged); }
private void m_Items_AddItem(TuxBarItem item) { item.Theme = m_TuxTheme; item.Resize += new EventHandler(item_Resize); item.Toogle += new EventHandler(item_Toogle); this.Controls.Add(item); AlignControls(); this.Refresh(); }
public void Remove(TuxBarItem value) { if (RemoveItem != null) { RemoveItem(value); } m_List.Remove(value); if (LayoutChanged != null) { LayoutChanged(value, new EventArgs()); } }
internal void ResetWidth() { this.SuspendLayout(); for (int i = 0; i < m_Items.Count; i++) { TuxBarItem current = m_Items[i]; current.Width = this.ClientSize.Width - (ITEM_LATERAL_SPACING * 2); } this.ResumeLayout(); }
public void Insert(int index, TuxBarItem value) { m_List.Insert(index, value); if (InsertItem != null) { InsertItem(value, index); } if (LayoutChanged != null) { LayoutChanged(value, new EventArgs()); } value.Toogle += new EventHandler(LayoutChanged); }
public int Add(TuxBarItem value) { int i = m_List.Add(value); if (AddItem != null) { AddItem(value); } if (LayoutChanged != null) { LayoutChanged(value, new EventArgs()); } value.Toogle += new EventHandler(LayoutChanged); return(i); }
private void AlignControls() { this.SuspendLayout(); for (int i = 0; i < m_Items.Count; i++) { TuxBarItem current = m_Items[i]; if (i == 0) { current.Top = ITEM_TOP_SPACING; } else { TuxBarItem prev = m_Items[i - 1]; current.Top = ITEM_TOP_SPACING + prev.Top + prev.Height; } current.Width = this.ClientSize.Width - (ITEM_LATERAL_SPACING * 2); /*if (((Panel)this.Parent).VerticalScroll.Visible) * { * current.Width -= SystemInformation.VerticalScrollBarWidth - ITEM_LATERAL_SPACING; * }*/ current.Left = ITEM_LATERAL_SPACING; } if (m_Items.Count > 0) { TuxBarItem last = m_Items[m_Items.Count - 1]; this.Height = last.Top + last.Height + (ITEM_TOP_SPACING * 2); } this.ResumeLayout(); }
private void m_Items_RemoveItem(TuxBarItem item) { this.Controls.Remove(item); AlignControls(); this.Refresh(); }
public bool Contains(TuxBarItem value) { return m_List.Contains(value); }
public void Remove(TuxBarItem value) { if(RemoveItem != null) RemoveItem(value); m_List.Remove(value); if(LayoutChanged != null) LayoutChanged(value,new EventArgs()); }
public int Add(TuxBarItem value) { int i = m_List.Add(value); if(AddItem != null) AddItem(value); if(LayoutChanged != null) LayoutChanged(value,new EventArgs()); value.Toogle+=new EventHandler(LayoutChanged); return i; }
public int IndexOf(TuxBarItem value) { return m_List.IndexOf(value); }
public bool Contains(TuxBarItem value) { return(m_List.Contains(value)); }
public void RemoveAt(int index) { TuxBarItem item = (TuxBarItem)m_List[index]; Remove(item); }
public int IndexOf(TuxBarItem value) { return(m_List.IndexOf(value)); }