ToolTip Class

A ToolTip provides a small rectangular pop-up window that provides a brief description of a control's purpose when the pointer is touching the control.


Properties: (some of them)


Methods: (just a couple)


Example: (from an MSDN page)

// This example assumes that the Form_Load event handling method
// is connected to the Load event of the form.
private void Form1_Load(object sender, System.EventArgs e)
{
   // Create the ToolTip and associate with the Form container.
   ToolTip toolTip1 = new ToolTip();

   // Set up the delays for the ToolTip.
   toolTip1.AutoPopDelay = 5000;
   toolTip1.InitialDelay = 1000;
   toolTip1.ReshowDelay = 500;

   // Set up the ToolTip text for the Button and Checkbox.
   toolTip1.SetToolTip(this.button1, "My button1");
   toolTip1.SetToolTip(this.checkBox1, "My checkBox1");
}

End of Example


Notes

Notice that in the example we have one ToolTip instance for this form and use it for two controls. Presumably if we wanted different ToolTip windows to have different timing, we could have more than one ToolTip instance.

Why would we want to write our own code to draw the ToolTip window? One reason might be that we want to specify the font used.