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