AD
Administrator
Syncfusion Team
April 18, 2005 06:31 PM UTC
Hi Gurbhej,
The following code snippet shows how to implement per-item Tooltips for a ListBox, using ToolTipAdv and a MouseHover event handler:
private void listBox1_MouseHover(object sender, System.EventArgs e)
{
try
{
this.toolTipAdv1.Text = this.listBox1.Items[this.listBox1.IndexFromPoint(this.listBox1.PointToClient(Control.MousePosition))].ToString();
this.toolTipAdv1.ShowPopup(new Point(Control.MousePosition.X - 4, Control.MousePosition.Y - toolTipAdv1.Size.Height + 4));
}
catch
{
//The Mouse was pointing to blank space
}
}
Hope this helps.
Regards,
Gregory Austin
Syncfusion Inc.