예제 #1
0
        public HtmlEditorSidebarTitle()
        {
            // enable double buffered painting.
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            Height = 30;

            buttonChevron                = new BitmapButton(this.components);
            buttonChevron.ButtonStyle    = ButtonStyle.Bitmap;
            buttonChevron.ButtonText     = Res.Get(StringId.HideSidebar);
            buttonChevron.ToolTip        = Res.Get(StringId.HideSidebar);
            buttonChevron.Click         += new EventHandler(ClickHandler);
            buttonChevron.AccessibleName = Res.Get(StringId.HideSidebar);
            buttonChevron.TabStop        = true;
            buttonChevron.TabIndex       = 0;
            buttonChevron.RightToLeft    = (BidiHelper.IsRightToLeft ? RightToLeft.No : RightToLeft.Yes);
            buttonChevron.AllowMirroring = true;
            Controls.Add(buttonChevron);

            Click += new EventHandler(ClickHandler);

            //create the UI theme
            _uiTheme = new SidebarTitleUITheme(this);

            buttonChevron.Bounds =
                RectangleHelper.Center(_uiTheme.bmpChevronRight.Size, new Rectangle(0, 0, 20, ClientSize.Height), false);
        }
        public HtmlEditorSidebarTitle()
        {
            // enable double buffered painting.
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            Height = 30;

            buttonChevron = new BitmapButton(this.components);
            buttonChevron.ButtonStyle = ButtonStyle.Bitmap;
            buttonChevron.ButtonText = Res.Get(StringId.HideSidebar);
            buttonChevron.ToolTip = Res.Get(StringId.HideSidebar);
            buttonChevron.Click += new EventHandler(ClickHandler);
            buttonChevron.AccessibleName = Res.Get(StringId.HideSidebar);
            buttonChevron.TabStop = true;
            buttonChevron.TabIndex = 0;
            buttonChevron.RightToLeft = (BidiHelper.IsRightToLeft ? RightToLeft.No : RightToLeft.Yes);
            buttonChevron.AllowMirroring = true;
            Controls.Add(buttonChevron);

            Click += new EventHandler(ClickHandler);

            //create the UI theme
            _uiTheme = new SidebarTitleUITheme(this);

            buttonChevron.Bounds =
                RectangleHelper.Center(_uiTheme.bmpChevronRight.Size, new Rectangle(0, 0, 20, ClientSize.Height), false);
        }