Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/327.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# DataGridViewPaintParts枚举背景_C#_Winforms_Datagridview - Fatal编程技术网

C# DataGridViewPaintParts枚举背景

C# DataGridViewPaintParts枚举背景,c#,winforms,datagridview,C#,Winforms,Datagridview,关于DataGridViewPaintParts枚举,其中有三种背景: 背景、内容背景和选择背景 背景画什么?我可以在DataGridView RowPrePaint事件中使用e.PainParts来打开和关闭此功能,但它似乎没有任何作用 MSDN在其描述方面没有什么帮助 谢谢。我发现当我像现在这样使用文本框单元格时,实际上没有任何内容是用ContentBackground绘制的 如果按钮用作单元格(例如),则该按钮将由该选项绘制

关于DataGridViewPaintParts枚举,其中有三种背景:

背景、内容背景和选择背景

背景画什么?我可以在DataGridView RowPrePaint事件中使用e.PainParts来打开和关闭此功能,但它似乎没有任何作用

MSDN在其描述方面没有什么帮助


谢谢。

我发现当我像现在这样使用文本框单元格时,实际上没有任何内容是用ContentBackground绘制的

如果按钮用作单元格(例如),则该按钮将由该选项绘制