public void ShowToolTip(AutocompleteItem autocompleteItem, Control control = null)
{
var title = autocompleteItem.ToolTipTitle;
var text = autocompleteItem.ToolTipText;
if (control == null)
control = this;
if (string.IsNullOrEmpty(title))
{
toolTip.ToolTipTitle = null;
toolTip.SetToolTip(control, null);
return;
}
if (string.IsNullOrEmpty(text))
{
toolTip.ToolTipTitle = null;
toolTip.Show(title, control, Width + 3, 0, ToolTipDuration);
}
else
{
toolTip.ToolTipTitle = title;
toolTip.Show(text, control, Width + 3, 0, ToolTipDuration);
}
}