The ToolTip Control in C#.Net
A ToolTip control is used to display some text when the mouse is move over a control. This control is helpful in providing quick information when the user moves the mouse over an associated control.
How to use ToolTip Control
Drag and drop a Tooltip control and control on which you want to use tooltip control.
Code:
private void frmToolTip_Load(object sender, EventArgs e)
{
//tooltip is set to Button
toolTip1.SetToolTip(button1, "Click to next Image");
}
Run the project
When the mouse will move over the Next button then tooltip will show.
ToolTip properties
Active - set the tooltip status, by default it set to true set false to hide the tooltip.
ToolTipIcon -set the icon that will show on the tooltip.
Example:
private void frmToolTip_Load(object sender, EventArgs e)
{
//set the tooltip icon
toolTip1.ToolTipIcon = ToolTipIcon.Info;
}
IsBalloon: when IsBalloon property is true then tooltip will display as a balloon.Example:
private void frmToolTip_Load(object sender, EventArgs e)
{
//tooltip show as baloon
toolTip1.IsBalloon = true;
}
Anonymous User
05-Apr-2019Thank You.
Samuel Fernandes
31-Jul-2017It was really helpful to read this post.