NtHeaderControl.OnPaintBackground Method

Inherited from System.Windows.Forms.Control. In this class this method does nothing. The background may vary from column to column, so the drawing of the background is done in the OnPaint() method.
 
For details on how to set the background color of the different columns or in general, see the tutorial Header Control Column Colors.

Overload List:

Modifier / Return Value Name and Parameters Description

protected override void

OnPaintBackground ( PaintEventArgs pe )

Does the painting of the background of the NtHeaderControl.

Return value:

void

Parameters:

PaintEventArgs pe
The PaintEventArgs that contain the necessary information for painting. Mainly the ClipRect and the Graphics object.

Remarks:

As the background of the columns in this control is painted by the OnPaint method, overriding OnPaintBackground makes sense only, if you also override OnPaint. Normally this does not make sense, it is better to only override OnPaint alone and do all the painting there.

See also:

OnPaint()