C# Change background color of a table cell inTableLayoutPanel

后端 未结 2 1681
野的像风
野的像风 2021-01-22 01:54

I am trying to change the background color of a table cell inside a TableLayoutPanel programmatically. The cells can either be null or taken by a user

2条回答
  •  情深已故
    2021-01-22 02:22

    when the cell is null, you can not set it's BackColor property. When set color, you should check if it is null. And you can set color of controls in the cells rather than cell's BackColor. example

提交回复
热议问题