如何在其图标下方显示devexpress命令按钮的标题?

时间:2013-10-30 13:22:07

标签: devexpress

我想在devexpress表单上使用CommandButton。我将.glyph设置为大图像。然后我将PaintStyle(我发现也只显示标题的方式)设置为CaptionGlyph值。它将标题放在Icon旁边。如何将它放在Icon下面(见左边的一个LargeButton)。

enter image description here

1 个答案:

答案 0 :(得分:0)

我只需要.command中的CommandButton,因此我决定从现有的BarLargeButtonItem创建一个新组件,并实现ISupportReportCommand。只有这个问题,我只能通过修改.designer.cs文件把它放在表单上,​​什么是lamme,但是有效。

这是代码,以防其他人需要这样的事情:

using DevExpress.XtraBars;
using DevExpress.XtraReports.UserDesigner;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace StefaniaNET.Nyomtatvanyok.Komponensek
{
  public class Gomb : BarLargeButtonItem, ISupportReportCommand 
  {
    public Gomb()
    {
      #region alapbeállítások
      PaintStyle = BarItemPaintStyle.CaptionGlyph;
      CaptionAlignment = BarItemCaptionAlignment.Bottom;
      #endregion
    }

    #region ISupportReportCommand implementáció
    public ReportCommand Command { get; set; }

    //public ReportCommand Command
    //{
    //  get { throw new NotImplementedException(); }
    //}
    #endregion
  }
}