DataGridViewTopLeftHeaderCell.GetErrorIconBounds 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
如果显示了单元格的错误图标,则返回环绕该图标的边框。
protected:
override System::Drawing::Rectangle GetErrorIconBounds(System::Drawing::Graphics ^ graphics, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, int rowIndex);
protected override System.Drawing.Rectangle GetErrorIconBounds (System.Drawing.Graphics graphics, System.Windows.Forms.DataGridViewCellStyle cellStyle, int rowIndex);
override this.GetErrorIconBounds : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int -> System.Drawing.Rectangle
Protected Overrides Function GetErrorIconBounds (graphics As Graphics, cellStyle As DataGridViewCellStyle, rowIndex As Integer) As Rectangle
参数
- graphics
- Graphics
单元格的图形上下文。
- cellStyle
- DataGridViewCellStyle
要应用到单元格的 DataGridViewCellStyle。
- rowIndex
- Int32
该单元格的父行索引。
返回
如果显示了单元格的错误图标,则为包围该图标的 Rectangle;否则为 Empty。
例外
rowIndex
不等于 -1。
注解
调用此方法时,会动态计算单元格的错误图标区域的大小。
读取 属性时, ErrorIconBounds 将在内部调用此方法。
适用于
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈