コード例 #1
0
        private void lb_MouseMove(object sender, MouseEventArgs e)
        {
            string strTip = "";

            //Get the item
            ListBoxArticle lba  = sender as ListBoxArticle;
            int            nIdx = lba.IndexFromPoint(e.Location);

            if ((nIdx >= 0) && (nIdx < lba.Items.Count))
            {
                strTip = lba.Items[nIdx].ToString();
            }

            if (strTip != tooltip.GetToolTip(lba))
            {
                tooltip.SetToolTip(lba, strTip);
            }
        }