public virtual void Assign(vTabCollection collection) { this.BeginUpdate(); try { base.Clear(); for (int i = 0; i < collection.Count; i++) { vTabPage page = collection[i]; vTabPage newPage = new vTabPage(); newPage.Assign(page); this.Add(newPage); } } finally { this.EndUpdate(); } }
public vTabControl() { this.BeginInit(); this.SetStyle( ControlStyles.ContainerControl | ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.Selectable, true); this.UpdateStyles(); this._tabPages = new vTabCollection(); this._tabPages.CollectionChanged += new CollectionChangeEventHandler(OnCollectionChanged); this.Font = _defaultFont; this._sf = new StringFormat(); this.EndInit(); this.UpdateLayout(); }