Return to Snippet

Revision: 30091
at August 7, 2010 06:12 by kat


Initial Code
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);
    }

Initial URL

                                

Initial Description

                                

Initial Title
tooltips on list box

Initial Tags

                                

Initial Language
C#