첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
using System.Drawing;
using System.Windows.Forms;

using DevExpress.XtraGrid.Views.Grid;

...

private GridView gridView;

...

private ImageList imageList;

...

this.gridView.CustomDrawRowFooterCell += gridView_CustomDrawRowFooterCell;

...

private void gridView_CustomDrawRowFooterCell(object sender, FooterCellCustomDrawEventArgs e)
{
    Brush     brush     = Brushes.AliceBlue;
    Rectangle rectangle = e.Bounds;

    ControlPaint.DrawBorder3D(e.Graphics, rectangle, Border3DStyle.SunkenOuter);

    rectangle.Inflate(-1, -1);

    e.Graphics.FillRectangle(brush, rectangle);
			
    rectangle.Inflate(-2, 0);

    e.Appearance.DrawString(e.Cache, e.Info.DisplayText, rectangle);
			
    if(e.Column.AbsoluteIndex == 0)
    {
        int x = rectangle.X + 2;
        int y = rectangle.Y + (rectangle.Height - this.imageList.ImageSize.Height) / 2;

        e.Graphics.DrawImageUnscaled(this.imageList.Images[2], x, y);
    }

    e.Handled = true;
}
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요