DataGridView.PaintBackground(Graphics, Rectangle, Rectangle) 方法

定义

绘制 DataGridView 的背景。Paints the background of the DataGridView.

protected:
 virtual void PaintBackground(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle gridBounds);
protected virtual void PaintBackground (System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle gridBounds);
abstract member PaintBackground : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle -> unit
override this.PaintBackground : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle -> unit

参数

graphics
Graphics

用于绘制背景的 GraphicsThe Graphics used to paint the background.

clipBounds
Rectangle

Rectangle,它表示需要绘制的 DataGridView 区域。A Rectangle that represents the area of the DataGridView that needs to be painted.

gridBounds
Rectangle

一个 Rectangle,表示绘制单元格的区域。A Rectangle that represents the area in which cells are drawn.

注解

@No__t 的参数表示需要重新绘制的 @no__t 的区域。The clipBounds parameter represents the area of the DataGridView that needs to be repainted. 例如,如果用户覆盖了整个 DataGridView 与另一个窗口,然后将其暴露,则 clipBounds 表示整个 @no__t。For example, if a user covers the entire DataGridView with another window and then uncovers it, then clipBounds represents the entire DataGridView. 如果用户涵盖 DataGridView 的小区域,然后将其发现,则 clipBounds 表示涵盖的小区域。If a user covers a small area of the DataGridView and then uncovers it, then clipBounds represents the small area that was covered.

适用于

另请参阅