Export (0) Print
Expand All

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft