tags:

views:

52

answers:

1

I am trying to display tooltip for items in combobox. I tried this code in combobox selected index changed event but it does not work as expected.

ToolTip toolTip1 = new ToolTip();
toolTip1.AutoPopDelay = 5;
toolTip1.InitialDelay = 0;
toolTip1.ReshowDelay = 0;
toolTip1.ShowAlways = true;
for (int i = 0; i < cbo.Items.Count; i++)
{
  toolTip1.SetToolTip(this.cbo, cboCounty.Items[cbo.SelectedIndex].ToString()); 
}             

As it is not possible to add tooltip to combobox control directly, we may have to create a user control for implementing this functionality. Can anyone guide to create a customized combobox which displays tooltips for items in it?

A: 

You can try this solution from CodeProject. It is in VB, but I hope you can understand how it works. Please let me know if you have any difficulties with this.

Rewinder