3

After reading the descriptions of every property, I just can't find anything to define a tooltip in the groupbox class, or textbox or listview. Can I ask for a link to put me on the right track?

CodeMinion
  • 653
  • 2
  • 10
  • 24

2 Answers2

3

To define tooltips, you first need to drag a ToolTip component on the from from the toolbox. Then every control will have addition tooltip text properties. You can also do that manually:

ToolTip toolTip1 = new ToolTip();
toolTip1.SetToolTip(this.groupBox1, "My groupBox1 tooltip!");
toolTip1.SetToolTip(this.checkBox1, "My checkBox1 tooltip!");

See the msdn article here.

Teoman Soygul
  • 25,584
  • 6
  • 69
  • 80
  • 1
    thanks! :) The designer isn't very clear on how to assign tooltips to objects, I prefer to do it via code. – CodeMinion May 22 '11 at 22:31
0
  1. Add ToolTip control to the form. Drag and drop from the Toolbox.
  2. Go to the properties of the group box and set property Tool Tip on toolTip1 to the desired tooltip text (toolTip1 is the name of your tooltip control).
Alex Aza
  • 76,499
  • 26
  • 155
  • 134