public virtual void Assign(BrowserTabStripItemCollection collection)
 {
     BeginUpdate();
     try {
         Clear();
         for (int i = 0; i < collection.Count; i++)
         {
             BrowserTabStripItem item           = collection[i];
             BrowserTabStripItem fATabStripItem = new BrowserTabStripItem();
             fATabStripItem.Assign(item);
             Add(fATabStripItem);
         }
     }
     finally {
         EndUpdate();
     }
 }
Exemple #2
0
 public BrowserTabStrip()
 {
     BeginInit();
     SetStyle(ControlStyles.ContainerControl, value: true);
     SetStyle(ControlStyles.UserPaint, value: true);
     SetStyle(ControlStyles.ResizeRedraw, value: true);
     SetStyle(ControlStyles.AllPaintingInWmPaint, value: true);
     SetStyle(ControlStyles.OptimizedDoubleBuffer, value: true);
     SetStyle(ControlStyles.Selectable, value: true);
     items = new BrowserTabStripItemCollection();
     items.CollectionChanged += OnCollectionChanged;
     base.Size            = new Size(350, 200);
     menu                 = new ContextMenuStrip();
     menu.Renderer        = base.ToolStripRenderer;
     menu.ItemClicked    += OnMenuItemClicked;
     menu.VisibleChanged += OnMenuVisibleChanged;
     closeButton          = new BrowserTabStripCloseButton(base.ToolStripRenderer);
     Font                 = defaultFont;
     sf = new StringFormat();
     EndInit();
     UpdateLayout();
 }