![](/img/trans.png)
[英]Placing multiple panels in a single cell of TableLayoutPanel in C# Winforms
[英]winforms how to paint (fillRectangle) a single cell in TableLayoutPanel?
您好在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);
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.