2
기본 데이터 표보기 선보다 두꺼운 선이 필요하기 때문에 자체 그리드 선을 그려야합니다. 이것은 내가 그것을 어떻게 사용하고 코드입니다 :사용자 지정 DataGridView 셀 페인팅
private void dgv_Wafer_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
using (Pen p = new Pen(Brushes.Black, 12))
{
e.Graphics.DrawLine(p, new Point(0, e.CellBounds.Bottom), new Point(e.CellBounds.Right, e.CellBounds.Bottom));
}
using (Pen p = new Pen(Brushes.Black, 6))
{
e.Graphics.DrawLine(p, new Point(e.CellBounds.Right, 0), new Point(e.CellBounds.Right - 1, e.CellBounds.Bottom));
}
}
선이 그려집니다하지만 수평 라인이 마지막 열에서 그려지지 않습니다 수직 라인이 마지막 행에 그려지지 않습니다. 선이 너무 작은 열과 행 인 격자를 만듭니다. 누구든지이 문제를 해결하는 방법을 알고 있습니까?
완벽하게 작동 해 주셔서 감사합니다. – user3194708