嗨 在 winforms 中如何在 TableLayoutPanel 中绘制 (fillRectangle) 单个单元格? 请不要使用其他面板。
最佳答案
您必须订阅 CellPaint 事件。 例如:
private void tableLayoutPanel_CellPaint(object sender, TableLayoutCellPaintEventArgs e)
{
if (e.Row == 0 && e.Column == 1)
{
e.Graphics.FillRectangle(new SolidBrush(Color.Black), e.CellBounds);
}
}
关于c# - winforms如何在TableLayoutPanel中绘制(fillRectangle)单个单元格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6031245/