Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

 

Initializes a new instance of the DrawItemEventArgs class for the specified control with the specified font, state, foreground color, background color, 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,
	Color foreColor,
	Color backColor
)

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.

foreColor
Type: System.Drawing::Color

The foreground Color to draw the control with.

backColor
Type: System.Drawing::Color

The background Color to draw the control with.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft