mardi 26 juin 2018

HelpProvider in checbox list specific item (C#)

I'm making an app which uses a checkbox list. Each item has to have a "description", so I decided to make it with a HelpProvider. But the problem is that when I make a loop that should fill all the checkboxes in checkbox list with a helprovider, Visual tells me that it is an object which cannot be converted into System.Windows.Forms.Control

Any ideas for a workaround?

for (int i = 0; i < CheckedListBox.Items.Count; i++)
{
     this.AdditionalInfos.SetShowHelp(CheckedListBox.Items[i], true);
     this.AdditionalInfos.SetHelpString(CheckedListBox.Items[i], "example description");
}




Aucun commentaire:

Enregistrer un commentaire