System.Windows.Forms.DrawToolTipEventArgs Class

Provides data for the ToolTip.Draw event.

See Also: DrawToolTipEventArgs Members

Syntax

public class DrawToolTipEventArgs : EventArgs

Remarks

The ToolTip.Draw event is raised by the System.Windows.Forms.ToolTip class when the System.Windows.Forms.ToolTip is drawn and the ToolTip.OwnerDraw property value is true. The handler for this event receives a parameter of type System.Windows.Forms.DrawToolTipEventArgs. The System.Windows.Forms.DrawToolTipEventArgs class contains all the information needed to paint the System.Windows.Forms.ToolTip, including the System.Windows.Forms.ToolTip text, the System.Drawing.Rectangle, and the System.Drawing.Graphics object on which the drawing should be done. To customize the look of the ToolTip, use the System.Drawing.Rectangle to determine the bounds of the ToolTip, and the System.Drawing.Graphics object to perform your customized drawing. You can increase the bounds of the System.Windows.Forms.ToolTip before it is shown by handling the ToolTip.Popup event.

System.Windows.Forms.DrawToolTipEventArgs also supports partial customization through the DrawToolTipEventArgs.DrawBackground, DrawToolTipEventArgs.DrawText and DrawToolTipEventArgs.DrawBorder methods. Using these methods, you can owner draw portions of the ToolTip while leaving the other portions drawn in the standard way.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0