TOOLTIP ON COMBOBOX DROPDOWN ITEMS IN C#.NET

Simons Hood

Total Post:70

Points:494
Posted by  Simons Hood
C#  .NET 
 3778  View(s)
Ratings:
Rate this:
I need an event to be raised when mouse hovers over  Combo Box items so that I could provide ToolTip for Items of dropDownArea of ComboBox. 
how to get index of comboBoxItem pointed by cursor ? 
Thanks in advance. 
  1. Takeshi Okada

    Post:89

    Points:629
    Re: Tooltip On Combobox Dropdown Items In C#.NET

    Below code will help you to achieve your goal. 
    //
    // This method binds tooltip with a dropdown/ any list control
    //
    public static void BindTooltip(ListControl lc) { for (int i = 0; i < lc.Items.Count; i++)
        {
            lc.Items[i].Attributes.Add("title", lc.Items[i].Text);
        }
    }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!