public static void LTooltip(System.Windows.Forms.Label label, int length, string value)
{
label.Text = value;
if (value.Length > length)
{
label.Text = label.Text.Substring(0, length) + "...";
}
var tip = new ToolTip();
tip.IsBalloon = false;
tip.ShowAlways = true;
tip.SetToolTip(label, value);
}
public static void ChbTooltip(System.Windows.Forms.CheckBox ck, int length, string value)
{
ck.Text = value;
if (value.Length > length)
{
ck.Text = ck.Text.Substring(0, length) + "...";
}
var tip = new ToolTip();
tip.IsBalloon = false;
tip.ShowAlways = true;
tip.SetToolTip(ck, value);
}