DataGridViewCellPaintingEventArgs 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 DataGridViewCellPaintingEventArgs 类的新实例。
public:
DataGridViewCellPaintingEventArgs(System::Windows::Forms::DataGridView ^ dataGridView, System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle cellBounds, int rowIndex, int columnIndex, System::Windows::Forms::DataGridViewElementStates cellState, System::Object ^ value, System::Object ^ formattedValue, System::String ^ errorText, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ advancedBorderStyle, System::Windows::Forms::DataGridViewPaintParts paintParts);
public DataGridViewCellPaintingEventArgs (System.Windows.Forms.DataGridView dataGridView, System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, int columnIndex, System.Windows.Forms.DataGridViewElementStates cellState, object value, object formattedValue, string errorText, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle, System.Windows.Forms.DataGridViewPaintParts paintParts);
public DataGridViewCellPaintingEventArgs (System.Windows.Forms.DataGridView dataGridView, System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, int columnIndex, System.Windows.Forms.DataGridViewElementStates cellState, object? value, object? formattedValue, string? errorText, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle? advancedBorderStyle, System.Windows.Forms.DataGridViewPaintParts paintParts);
new System.Windows.Forms.DataGridViewCellPaintingEventArgs : System.Windows.Forms.DataGridView * System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * int * System.Windows.Forms.DataGridViewElementStates * obj * obj * string * System.Windows.Forms.DataGridViewCellStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewPaintParts -> System.Windows.Forms.DataGridViewCellPaintingEventArgs
Public Sub New (dataGridView As DataGridView, graphics As Graphics, clipBounds As Rectangle, cellBounds As Rectangle, rowIndex As Integer, columnIndex As Integer, cellState As DataGridViewElementStates, value As Object, formattedValue As Object, errorText As String, cellStyle As DataGridViewCellStyle, advancedBorderStyle As DataGridViewAdvancedBorderStyle, paintParts As DataGridViewPaintParts)
参数
- dataGridView
- DataGridView
包含要进行绘制的单元格的 DataGridView。
- graphics
- Graphics
用于绘制 DataGridViewCell 的 Graphics。
- clipBounds
- Rectangle
一个 Rectangle,表示需要重新绘制的 DataGridView 区域。
- cellBounds
- Rectangle
一个 Rectangle,包含正在绘制的 DataGridViewCell 的边界。
- rowIndex
- Int32
当前所绘制的单元格的行索引。
- columnIndex
- Int32
当前所绘制单元格的列索引。
- cellState
- DataGridViewElementStates
DataGridViewElementStates 值的按位组合,用于指定单元格的状态。
- value
- Object
正在绘制的 DataGridViewCell 的数据。
- formattedValue
- Object
正在绘制的 DataGridViewCell 的格式化数据。
- errorText
- String
与单元格关联的错误消息。
- cellStyle
- DataGridViewCellStyle
包含有关单元格的格式和样式信息的 DataGridViewCellStyle。
- advancedBorderStyle
- DataGridViewAdvancedBorderStyle
包含正在绘制的单元格的边框样式的 DataGridViewAdvancedBorderStyle。
- paintParts
- DataGridViewPaintParts
用于指定要绘制的部分的 DataGridViewPaintParts 值的按位组合。
例外
paintParts
不是 DataGridViewPaintParts 值的有效按位组合。
适用于
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈