Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Button tip when Mouse is over

I have a simple question ! I'd like to know how to add like a tip when the user puts his mouse over a button, like that like grey box that appears right below the button. I'm using Windows Form !

P.S-> I know it's obsolete and we now have WPF but I'm using Form !

Thanks !

like image 440
Leonardo Avatar asked Jul 04 '12 05:07

Leonardo


1 Answers

Use ToolTip on the button. Like.

System.Windows.Forms.ToolTip ToolTip1 = new System.Windows.Forms.ToolTip();
ToolTip1.SetToolTip(this.Button1, "Button Info");

Or you can:
Add a ToolTip control to your form, Name it ToolTip1.
Add text for tooltip to the "ToolTip on ToolTip1" property of the button.

like image 116
Habib Avatar answered Nov 04 '22 11:11

Habib