0
我想基于细胞变化的datagridview cellstyle边框颜色
此背景颜色更改单元格边框的颜色是什么,我已经使用
'Draw custom cell borders.
Using Brush As New SolidBrush(grdList.ColumnHeadersDefaultCellStyle.BackColor)
e.Graphics.FillRectangle(Brush, e.CellBounds)
End Using
e.Paint(e.CellBounds, DataGridViewPaintParts.All And Not DataGridViewPaintParts.ContentBackground)
Debug.Print(e.CellStyle.BackColor.ToString)
ControlPaint.DrawBorder(e.Graphics, e.CellBounds, e.CellStyle.BackColor, 1, _
ButtonBorderStyle.Solid, e.CellStyle.BackColor, 1, _
ButtonBorderStyle.Solid, e.CellStyle.BackColor, 1, _
ButtonBorderStyle.Solid, Color.Black, 1, _
ButtonBorderStyle.Solid)
这是结果
我不知道目前看到的白线
你不想白色的,但你想要什么?它看起来像你试图画黑线。 – Plutonix