/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private void OnListBoxMouseMove(object sender, MouseEventArgs e) { int itemIndex = -1; if (m_LinksListBox.ItemHeight != 0) { itemIndex = e.Y / m_LinksListBox.ItemHeight; itemIndex += m_LinksListBox.TopIndex; } if ((itemIndex >= 0) && (itemIndex < m_LinksListBox.Items.Count)) { ILink mouseOveredLink = (m_LinksListBox.Items[itemIndex] as LinkListItem).Link; if (mouseOveredLink != null) { if (!ListBoxToolTip.GetToolTip(m_LinksListBox).Equals(mouseOveredLink.FileName)) { ListBoxToolTip.SetToolTip(m_LinksListBox, mouseOveredLink.FileName); } return; } } ListBoxToolTip.Hide(m_LinksListBox); }