DataGridViewRowPostPaintEventArgs.PaintHeader 方法

定义

绘制当前行的行标头。Paints the row header of the current row.

重载

PaintHeader(Boolean)

绘制当前 DataGridViewRow 的整个行标头。Paints the entire row header of the current DataGridViewRow.

PaintHeader(DataGridViewPaintParts)

绘制当前行的行标头的指定部分。Paints the specified parts of the row header of the current row.

PaintHeader(Boolean)

绘制当前 DataGridViewRow 的整个行标头。Paints the entire row header of the current DataGridViewRow.

public:
 void PaintHeader(bool paintSelectionBackground);
public void PaintHeader (bool paintSelectionBackground);
member this.PaintHeader : bool -> unit
Public Sub PaintHeader (paintSelectionBackground As Boolean)

参数

paintSelectionBackground
Boolean

若为 true,则使用 SelectionBackColorInheritedStyle 属性的颜色绘制行标头;若为 false,则使用 BackColorRowHeadersDefaultCellStyle 属性的颜色绘制行标头。true to paint the row header with the color of the SelectionBackColor property of the InheritedStyle; false to paint the row header with the BackColor of the RowHeadersDefaultCellStyle property.

异常

RowIndex 小于零或大于将 DataGridView 控件中的行数减一得到的值。RowIndex is less than zero or greater than the number of rows in the DataGridView control minus one.

另请参阅

PaintHeader(DataGridViewPaintParts)

绘制当前行的行标头的指定部分。Paints the specified parts of the row header of the current row.

public:
 void PaintHeader(System::Windows::Forms::DataGridViewPaintParts paintParts);
public void PaintHeader (System.Windows.Forms.DataGridViewPaintParts paintParts);
member this.PaintHeader : System.Windows.Forms.DataGridViewPaintParts -> unit
Public Sub PaintHeader (paintParts As DataGridViewPaintParts)

参数

paintParts
DataGridViewPaintParts

用于指定要绘制的部分的 DataGridViewPaintParts 值的按位组合。A bitwise combination of DataGridViewPaintParts values specifying the parts to paint.

异常

RowIndex 小于零或大于将 DataGridView 控件中的行数减一得到的值。RowIndex is less than zero or greater than the number of rows in the DataGridView control minus one.

另请参阅

适用于