views:

1623

answers:

5

This has got to be something I just missed, but how do I add a tool tip to a label?

I saw something on the web about handling the mouse hover event, but how would I even handle it in code?

+5  A: 

Add in your form the TooTip from the ToolBox than click once in your label and you'll see ToolTip in the property box.

Daok
+1  A: 

Drop the TOOLTIP control onto your form. At that point, a ToolTip attribute appears in the Label's properties in the Designer (and is accessible in the code)

Stephen Wrighton
+2  A: 

Don't you just drop a ToolTip on a form, and then select the label and set the "Tooltip on Tooltip1" property? At least I remember doing it that way, or something very close to it.

Programmatically from MSDN:

System.Windows.Forms.ToolTip ToolTip1 = new System.Windows.Forms.ToolTip();
ToolTip1.SetToolTip(this.textBox1, "Hello");
cfeduke
A: 
button = new Button(); 
button.Content = "Hover over me."; 
tt = new ToolTip(); 
tt.Content = "Created with C#"; 
button.ToolTip = tt; 
cv2.Children.Add(button);

from http://msdn.microsoft.com/en-us/library/ms754034.aspx

FYI: the code above is for WPF
Richard Morgan
A: 

ahhhhh

i knew it was so freaking easy.

thanks guys

Miles