DrawToolTipEventArgs 构造函数

定义

初始化 DrawToolTipEventArgs 类的新实例。

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)

参数

graphics
Graphics

用于绘制工具提示的 Graphics 上下文。

associatedWindow
IWin32Window

工具提示绑定到的 IWin32Window

associatedControl
Control

将为其创建工具提示的 Control

bounds
Rectangle

Rectangle,它勾勒要显示工具提示的区域的轮廓。

toolTipText
String

String,包含工具提示的文本。

backColor
Color

工具提示背景的 Color

foreColor
Color

工具提示文本的 Color

font
Font

用于绘制工具提示文本的 Font

注解

The DrawToolTipEventArgs constructor uses the graphics, associatedControl, associatedWindow, bounds, font and toolTipText parameters to initialize their corresponding, similarly named properties. 和backColor``foreColor参数分别由DrawBackground方法和DrawText方法使用。

适用于

另请参阅