Ejemplo n.º 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();
        }
Ejemplo n.º 2
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();
		}