예제 #1
0
        public OMETabStrip()
        {
            BeginInit();

            SetStyle(ControlStyles.ContainerControl, true);
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.Selectable, true);

            items = new OMETabStripItemCollection();
            items.CollectionChanged += new CollectionChangeEventHandler(OnCollectionChanged);
            base.Size = new Size(350, 200);

            menu                 = new ContextMenuStrip();
            menu.Renderer        = ToolStripRenderer;
            menu.ItemClicked    += new ToolStripItemClickedEventHandler(OnMenuItemClicked);
            menu.VisibleChanged += new EventHandler(OnMenuVisibleChanged);

            menuGlyph = new OMETabStripMenuGlyph(ToolStripRenderer);

            closeButton = new OMETabStripCloseButton(ToolStripRenderer);
            Font        = defaultFont;
            sf          = new StringFormat();

            EndInit();

            UpdateLayout();
        }
 public virtual void Assign(OMETabStripItemCollection collection)
 {
     BeginUpdate();
     try
     {
         Clear();
         for (int n = 0; n < collection.Count; n++)
         {
             OMETabStripItem item    = collection[n];
             OMETabStripItem newItem = new OMETabStripItem();
             newItem.Assign(item);
             Add(newItem);
         }
     }
     finally
     {
         EndUpdate();
     }
 }
예제 #3
0
		public virtual void Assign(OMETabStripItemCollection collection)
		{
			BeginUpdate();
			try
			{
				Clear();
				for (int n = 0; n < collection.Count; n++)
				{
					OMETabStripItem item = collection[n];
					OMETabStripItem newItem = new OMETabStripItem();
					newItem.Assign(item);
					Add(newItem);
				}
			}
			finally
			{
				EndUpdate();
			}
		}
예제 #4
0
		public OMETabStrip()
		{
			BeginInit();

			SetStyle(ControlStyles.ContainerControl, true);
			SetStyle(ControlStyles.UserPaint, true);
			SetStyle(ControlStyles.ResizeRedraw, true);
			SetStyle(ControlStyles.AllPaintingInWmPaint, true);
			SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
			SetStyle(ControlStyles.Selectable, true);

			items = new OMETabStripItemCollection();
			items.CollectionChanged += new CollectionChangeEventHandler(OnCollectionChanged);
			base.Size = new Size(350, 200);

			menu = new ContextMenuStrip();
			menu.Renderer = ToolStripRenderer;
			menu.ItemClicked += new ToolStripItemClickedEventHandler(OnMenuItemClicked);
			menu.VisibleChanged += new EventHandler(OnMenuVisibleChanged);

			menuGlyph = new OMETabStripMenuGlyph(ToolStripRenderer);

			closeButton = new OMETabStripCloseButton(ToolStripRenderer);
			Font = defaultFont;
			sf = new StringFormat();

			EndInit();

			UpdateLayout();
		}