Editar

Compartilhar via


DrawToolTipEventArgs Constructor

Definition

Initializes a new instance of the DrawToolTipEventArgs class.

public:
 DrawToolTipEventArgs(System::Drawing::Graphics ^ graphics, System::Windows::Forms::IWin32Window ^ associatedWindow, System::Windows::Forms::Control ^ associatedControl, System::Drawing::Rectangle bounds, System::String ^ toolTipText, System::Drawing::Color backColor, System::Drawing::Color foreColor, System::Drawing::Font ^ font);
public DrawToolTipEventArgs (System.Drawing.Graphics graphics, System.Windows.Forms.IWin32Window associatedWindow, System.Windows.Forms.Control associatedControl, System.Drawing.Rectangle bounds, string toolTipText, System.Drawing.Color backColor, System.Drawing.Color foreColor, System.Drawing.Font font);
public DrawToolTipEventArgs (System.Drawing.Graphics graphics, System.Windows.Forms.IWin32Window? associatedWindow, System.Windows.Forms.Control? associatedControl, System.Drawing.Rectangle bounds, string? toolTipText, System.Drawing.Color backColor, System.Drawing.Color foreColor, System.Drawing.Font? font);
new System.Windows.Forms.DrawToolTipEventArgs : System.Drawing.Graphics * System.Windows.Forms.IWin32Window * System.Windows.Forms.Control * System.Drawing.Rectangle * string * System.Drawing.Color * System.Drawing.Color * System.Drawing.Font -> System.Windows.Forms.DrawToolTipEventArgs
Public Sub New (graphics As Graphics, associatedWindow As IWin32Window, associatedControl As Control, bounds As Rectangle, toolTipText As String, backColor As Color, foreColor As Color, font As Font)

Parameters

graphics
Graphics

The Graphics context used to draw the ToolTip.

associatedWindow
IWin32Window

The IWin32Window that the ToolTip is bound to.

associatedControl
Control

The Control that the ToolTip is being created for.

bounds
Rectangle

A Rectangle that outlines the area where the ToolTip is to be displayed.

toolTipText
String

A String containing the text for the ToolTip.

backColor
Color

The Color of the ToolTip background.

foreColor
Color

The Color of the ToolTip text.

font
Font

The Font used to draw the ToolTip text.

Remarks

The DrawToolTipEventArgs constructor uses the graphics, associatedControl, associatedWindow, bounds, font and toolTipText parameters to initialize their corresponding, similarly named properties. The backColor and foreColor parameters are used by the DrawBackground and DrawText methods, respectively.

Applies to

See also