Tool Tip
A tool tip component that gives controls a tip with a title, an icon and text, drawn as a rectangle or as a rounded balloon pointing at the mouse pointer, with a soft drop shadow and colours of your choosing.
Assembly
| Assembly | Binarymission.WinForms.Controls.BinaryToolTip.dll |
| Root namespace | Binarymission.WinForms.Controls.Popups |
| Target frameworks | .NET Framework 4.8, .NET 6 / 8 / 10 |
Overview
Drop one on a form and every control on it gains BinaryToolTipText,
BinaryToolTipTitle, BinaryToolTipIcon and BinaryToolTipStyle properties "on
binaryToolTip1" in the Properties window; in code, call SetBinaryToolTipText and its
companions with the control.
When tips show
A control shows a tip once it has text. The tip appears when the pointer has rested on the
control for ToolTipHoverDelay, just below the pointer, and closes after
ToolTipHideDelay, or as soon as the pointer moves, leaves the control or presses a button.
Moving on to another control within ToolTipReshowDelay shows that control's tip at once.
A tip that would run off the screen is moved above the pointer or to the left.
Appearance
Each control's tip is a BinaryToolTipStyle.Standard rectangle or a
BinaryToolTipStyle.BalloonType balloon (ToolTipTipStyle, or
SetBinaryToolTipStyle per control). The colours, fonts, shadow and wrapping are set once on
the component and shared by all its tips: BackColor, BorderColor,
TitleForeColor, TextForeColor, ToolTipTextFont,
ShadowOffset, ShadowColor, CustomWidth.
Getting started
Balloon tips on a customer form's fields, in a cool blue.
using System.Drawing;
using System.Windows.Forms;
using Binarymission.WinForms.Controls.Popups;
public class CustomerForm : Form
{
private readonly BinaryToolTip _tips;
private readonly TextBox _vatNumber = new TextBox { Location = new Point(120, 16), Width = 160 };
private readonly TextBox _creditLimit = new TextBox { Location = new Point(120, 48), Width = 100 };
public CustomerForm()
{
_tips = new BinaryToolTip
{
ToolTipTipStyle = BinaryToolTipStyle.BalloonType,
BackColor = Color.AliceBlue,
BorderColor = Color.SteelBlue,
TitleForeColor = Color.MidnightBlue,
CustomWidth = 240,
ToolTipHoverDelay = 400
};
_tips.SetBinaryToolTipTitle(_vatNumber, "VAT number");
_tips.SetBinaryToolTipText(_vatNumber, "The customer's VAT registration number, for example GB123456789. Leave blank for private customers.");
_tips.SetBinaryToolTipIcon(_vatNumber, SystemIcons.Information.ToBitmap());
_tips.SetBinaryToolTipTitle(_creditLimit, "Credit limit");
_tips.SetBinaryToolTipText(_creditLimit, "The most the customer may owe at any time, in pounds sterling.");
Controls.Add(_vatNumber);
Controls.Add(_creditLimit);
}
}API reference
Binarymission.WinForms.Controls.Popups
class BinaryPointTip | A tool tip you show yourself, at any point on the screen - to point out a field that needs attention, confirm an action next to where it happened, or guide a user through a form - with a title, an icon, text and the same rectangle or balloon look as BinaryToolTip. |
class BinaryToolTip | A tool tip component that gives controls a tip with a title, an icon and text, drawn as a rectangle or as a rounded balloon pointing at the mouse pointer, with a soft drop shadow and colours of your choosing. |
enum BinaryToolTipStyle | Specifies the shape of a BinaryToolTip or BinaryPointTip tip. |