나는 사용자가 클릭 할 때 열 머리글에 사용자 정의 글리프 그리기 (삼각형을 가정 해 봅시다.)를 DataGridView 있습니다.DataGridView 헤더의 사용자 정의 글리프
나는 EnableHeadersVisualStyles을 으로 설정하고 있습니다. 거짓입니다.
원하는 결과를 얻는 방법에 대한 예나 제안이 있습니까? DataGridView 또는 DataGridViewColumn에서 상속해야합니까?
는 몇 일이 먼저 이벤트 핸들러 내에서이void GridView_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
e.PaintBackground(e.ClipBounds, true);
StringFormat sf = new StringFormat();
sf.Alignment = StringAlignment.Near;
e.Graphics.DrawString(e.FormattedValue.ToString() this.ColumnHeadersDefaultCellStyle.Font, new SolidBrush(this.ColumnHeadersDefaultCellStyle.ForeColor),e.CellBounds, sf);
//
//Place code to draw your custom gliph
//
e.Handled = true;
}
}
행 "sf.Alignment =처럼 수행 GridView_CellPainting 이벤트 핸들러를 첨부 할 필요가 사전에 마르코