更新时间:2023-12-06 10:24:10
您必须订阅CellPaint事件。
为例:
You have to subscribe to the CellPaint event. As an example:
private void tableLayoutPanel_CellPaint(object sender, TableLayoutCellPaintEventArgs e)
{
if (e.Row == 0 && e.Column == 1)
{
e.Graphics.FillRectangle(new SolidBrush(Color.Black), e.CellBounds);
}
}