コード例 #1
0
ファイル: FATabStrip.cs プロジェクト: git-thinh/CefSharp71
        public FATabStrip()
        {
            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 FATabStripItemCollection();
            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 FATabStripMenuGlyph(ToolStripRenderer);
            closeButton = new FATabStripCloseButton(ToolStripRenderer);
            Font        = defaultFont;
            sf          = new StringFormat();

            EndInit();

            UpdateLayout();
        }
コード例 #2
0
ファイル: FATabStrip.cs プロジェクト: DanWBR/dwsim3
        public FATabStrip()
        {
            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 FATabStripItemCollection();
            items.CollectionChanged += new CollectionChangeEventHandler(OnCollectionChanged);
            base.Size = new Size(350, 200);

            menu = new ContextMenuStrip();
            menu.RenderMode = ToolStripRenderMode.ManagerRenderMode;
            menu.ItemClicked += new ToolStripItemClickedEventHandler(OnMenuItemClicked);
            menu.VisibleChanged += new EventHandler(OnMenuVisibleChanged);

            menuGlyph = new FATabStripMenuGlyph(ToolStripRenderer);
            closeButton = new FATabStripCloseButton(ToolStripRenderer);
            Font = defaultFont;
            sf = new StringFormat();

            EndInit();

            UpdateLayout();
        }
コード例 #3
0
ファイル: FATabStrip.cs プロジェクト: up2038292/dwsim6
        public FATabStrip()
        {
            BeginInit();

            double dpiscale = 1.0;

            using (Graphics g = this.CreateGraphics())
            {
                dpiscale = g.DpiX / 96.0;
            }

            DEF_HEADER_HEIGHT = (int)(19 * dpiscale);

            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 FATabStripItemCollection();
            items.CollectionChanged += new CollectionChangeEventHandler(OnCollectionChanged);
            base.Size = new Size(350, 200);

            menu                 = new ContextMenuStrip();
            menu.RenderMode      = ToolStripRenderMode.ManagerRenderMode;
            menu.ItemClicked    += new ToolStripItemClickedEventHandler(OnMenuItemClicked);
            menu.VisibleChanged += new EventHandler(OnMenuVisibleChanged);

            menuGlyph   = new FATabStripMenuGlyph(ToolStripRenderer);
            closeButton = new FATabStripCloseButton(ToolStripRenderer);
            Font        = defaultFont;
            sf          = new StringFormat();

            EndInit();

            UpdateLayout();
        }