Esempio n. 1
0
        protected override void DrawContent(ObjectInfoArgs e)
        {
            DropDownButtonObjectInfoArgs args = e as DevExpress.XtraEditors.ViewInfo.DropDownButtonObjectInfoArgs;

            if (args != null)
            {
                if (args.Appearance.TextOptions.HAlignment == DevExpress.Utils.HorzAlignment.Near)
                {
                    lockDrawCaption = true;
                    base.DrawContent(e);
                    EditorButtonObjectInfoArgs ee = e as EditorButtonObjectInfoArgs;
                    Brush     brush       = GetForeBrush(ee);
                    Rectangle captionRect = this.GetObjectClientRectangle(e);
                    if (captionRect != Rectangle.Empty)
                    {
                        captionRect.X     += CalcDropDownArrowSize(ee).Width + args.BaseButtonInfo.Indent.Width + 4;
                        captionRect.Width -= CalcDropDownArrowSize(ee).Width;
                        StringFormat strFormat = ee.Appearance.GetStringFormat();
                        ButtonPainter.DrawCaption(args, args.Button.Caption, args.Appearance.Font, brush, captionRect, strFormat);
                    }
                    lockDrawCaption = false;
                }
                else
                {
                    base.DrawContent(e);
                }
            }
            else
            {
                base.DrawContent(e);
            }
        }
        protected override void DrawContent(DevExpress.Utils.Drawing.ObjectInfoArgs e)
        {
            EditorButtonObjectInfoArgs ee = e as EditorButtonObjectInfoArgs;
            string caption = OwnerEditInfo == null? ee.Button.Caption : OwnerEditInfo.DisplayText;

            ButtonPainter.DrawCaption(ee, caption, ee.Appearance.Font, GetForeBrush(ee), e.Bounds, ee.Appearance.GetStringFormat());
        }
Esempio n. 3
0
        protected override void DrawContent(DevExpress.Utils.Drawing.ObjectInfoArgs e)
        {
            EditorButtonObjectInfoArgs ee = e as EditorButtonObjectInfoArgs;
            string caption = ((ExtendedButtonEditViewInfo)OwnerEditInfo).GetButtonCaption(ee.Button);

            ButtonPainter.DrawCaption(ee, caption, ee.Appearance.Font, GetForeBrush(ee), e.Bounds, ee.Appearance.GetStringFormat());
        }