Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/316.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 更改tableLayoutpanel的单元格(背景颜色和背景图像)_C#_Tablelayoutpanel - Fatal编程技术网

C# 更改tableLayoutpanel的单元格(背景颜色和背景图像)

C# 更改tableLayoutpanel的单元格(背景颜色和背景图像),c#,tablelayoutpanel,C#,Tablelayoutpanel,问题1: 我想直接从Properties.Resource.image在TableLayoutPanel的单元格中添加一个图像 tableLayoutPanel1.Controls.Add(Properties.Resource.image,column,row); //cell backround should be covered with image 问题2: 我想改变细胞背面颜色简单的风格 tableLayoutPanel1.Position(column,row).backrou

问题1:

我想直接从Properties.Resource.image在TableLayoutPanel的单元格中添加一个图像

tableLayoutPanel1.Controls.Add(Properties.Resource.image,column,row);
  //cell backround should be covered with image
问题2: 我想改变细胞背面颜色简单的风格

tableLayoutPanel1.Position(column,row).backroundcolor=Color.Red;
不是那个话题,我甚至不能这样做。

TableLayoutPanel 1.控件。添加
需要一个控件。我如何解决它的问题?使用一个可以显示图像的控件,如PictureBox。你可以显示,我可以怎么做吗?在设计时,将
PictureBox
放入单元格,将其
Dock
属性设置为
Fill
,并检查图片框的其他属性。特别是
背景色
图像
尺寸模型
背景图像
,以及
背景图像布局