DrawItemEventArgs Constructor (Graphics, Font, Rectangle, Int32, DrawItemState)

 

Initializes a new instance of the DrawItemEventArgs class for the specified control with the specified font, state, surface to draw on, and the bounds to draw within.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public DrawItemEventArgs(
	Graphics graphics,
	Font font,
	Rectangle rect,
	int index,
	DrawItemState state
)

Parameters

graphics
Type: System.Drawing.Graphics

The Graphics surface on which to draw.

font
Type: System.Drawing.Font

The Font to use, usually the parent control's Font property.

rect
Type: System.Drawing.Rectangle

The Rectangle bounds to draw within.

index
Type: System.Int32

The System.Windows.Forms.Control.ControlCollection index value of the item that is being drawn.

state
Type: System.Windows.Forms.DrawItemState

The control's DrawItemState information.

.NET Framework
Available since 1.1
Return to top
Show: