예제 #1
0
        /// <include file='CodeDoc/DockPaneCaptionVS2003.xml' path='//CodeDoc/Class[@name="DockPaneCaptionVS2003"]/Construct[@name="(DockPane)"]/*'/>
        protected internal VS2003DockPaneCaption(DockPane pane) : base(pane)
        {
            SuspendLayout();

            Font = SystemInformation.MenuFont;

            m_buttonClose    = new InertButton(ImageCloseEnabled, ImageCloseDisabled);
            m_buttonAutoHide = new InertButton();

            m_buttonClose.ToolTipText = ToolTipClose;
            m_buttonClose.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonClose.Click      += new EventHandler(this.Close_Click);

            m_buttonAutoHide.ToolTipText = ToolTipAutoHide;
            m_buttonAutoHide.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonAutoHide.Click      += new EventHandler(AutoHide_Click);

            Controls.AddRange(new Control[]    { m_buttonClose, m_buttonAutoHide });

            ResumeLayout();
        }
예제 #2
0
        public VS2003DockPaneStrip(DockPane pane) : base(pane)
        {
            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            SuspendLayout();

            Font      = SystemInformation.MenuFont;
            BackColor = Color.WhiteSmoke;

            m_components = new Container();
            m_toolTip    = new ToolTip(Components);

            m_buttonClose       = new InertButton(ImageCloseEnabled, ImageCloseDisabled);
            m_buttonScrollLeft  = new InertButton(ImageScrollLeftEnabled, ImageScrollLeftDisabled);
            m_buttonScrollRight = new InertButton(ImageScrollRightEnabled, ImageScrollRightDisabled);

            m_buttonClose.ToolTipText = ToolTipClose;
            m_buttonClose.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonClose.Click      += new EventHandler(Close_Click);

            m_buttonScrollLeft.Enabled     = false;
            m_buttonScrollLeft.RepeatClick = true;
            m_buttonScrollLeft.ToolTipText = ToolTipScrollLeft;
            m_buttonScrollLeft.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonScrollLeft.Click      += new EventHandler(ScrollLeft_Click);

            m_buttonScrollRight.Enabled     = false;
            m_buttonScrollRight.RepeatClick = true;
            m_buttonScrollRight.ToolTipText = ToolTipScrollRight;
            m_buttonScrollRight.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            m_buttonScrollRight.Click      += new EventHandler(ScrollRight_Click);

            Controls.AddRange(new Control[] { m_buttonClose,
                                              m_buttonScrollLeft,
                                              m_buttonScrollRight });

            ResumeLayout();
        }