Home > DeveloperSection > Forums > Tooltip On Combobox Dropdown Items In C#.NET
Simons Hood
Simons Hood

Total Post:70

Points:494
Posted on    October-21-2014 12:07 AM

 .NET C#  .NET 
Ratings:


 1 Reply(s)
 2449  View(s)
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. 


Takeshi Okada
Takeshi Okada

Total Post:89

Points:629
Posted on    October-21-2014 12:08 AM

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

Don't want to miss updates? Please click the below button!

Follow MindStick