編輯

共用方式為


DrawItemEventArgs Constructors

Definition

Initializes a new instance of the DrawItemEventArgs class.

Overloads

DrawItemEventArgs(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.

DrawItemEventArgs(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.

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

Source:
DrawItemEventArgs.cs
Source:
DrawItemEventArgs.cs
Source:
DrawItemEventArgs.cs

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.

public:
 DrawItemEventArgs(System::Drawing::Graphics ^ graphics, System::Drawing::Font ^ font, System::Drawing::Rectangle rect, int index, System::Windows::Forms::DrawItemState state);
public DrawItemEventArgs (System.Drawing.Graphics graphics, System.Drawing.Font font, System.Drawing.Rectangle rect, int index, System.Windows.Forms.DrawItemState state);
public DrawItemEventArgs (System.Drawing.Graphics graphics, System.Drawing.Font? font, System.Drawing.Rectangle rect, int index, System.Windows.Forms.DrawItemState state);
new System.Windows.Forms.DrawItemEventArgs : System.Drawing.Graphics * System.Drawing.Font * System.Drawing.Rectangle * int * System.Windows.Forms.DrawItemState -> System.Windows.Forms.DrawItemEventArgs
Public Sub New (graphics As Graphics, font As Font, rect As Rectangle, index As Integer, state As DrawItemState)

Parameters

graphics
Graphics

The Graphics surface on which to draw.

font
Font

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

rect
Rectangle

The Rectangle bounds to draw within.

index
Int32

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

state
DrawItemState

The control's DrawItemState information.

Applies to

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

Source:
DrawItemEventArgs.cs
Source:
DrawItemEventArgs.cs
Source:
DrawItemEventArgs.cs

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.

public:
 DrawItemEventArgs(System::Drawing::Graphics ^ graphics, System::Drawing::Font ^ font, System::Drawing::Rectangle rect, int index, System::Windows::Forms::DrawItemState state, System::Drawing::Color foreColor, System::Drawing::Color backColor);
public DrawItemEventArgs (System.Drawing.Graphics graphics, System.Drawing.Font font, System.Drawing.Rectangle rect, int index, System.Windows.Forms.DrawItemState state, System.Drawing.Color foreColor, System.Drawing.Color backColor);
public DrawItemEventArgs (System.Drawing.Graphics graphics, System.Drawing.Font? font, System.Drawing.Rectangle rect, int index, System.Windows.Forms.DrawItemState state, System.Drawing.Color foreColor, System.Drawing.Color backColor);
new System.Windows.Forms.DrawItemEventArgs : System.Drawing.Graphics * System.Drawing.Font * System.Drawing.Rectangle * int * System.Windows.Forms.DrawItemState * System.Drawing.Color * System.Drawing.Color -> System.Windows.Forms.DrawItemEventArgs
Public Sub New (graphics As Graphics, font As Font, rect As Rectangle, index As Integer, state As DrawItemState, foreColor As Color, backColor As Color)

Parameters

graphics
Graphics

The Graphics surface on which to draw.

font
Font

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

rect
Rectangle

The Rectangle bounds to draw within.

index
Int32

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

state
DrawItemState

The control's DrawItemState information.

foreColor
Color

The foreground Color to draw the control with.

backColor
Color

The background Color to draw the control with.

Applies to