checked list box item name

  • Thread starter Thread starter fotis
  • Start date Start date
F

fotis

hi there

can anybody tell me if it's possible and how can i change
the name of a CheckedListBox item.I have used the Add
method to insert the item.

thank you
 
fotis,

The CheckedListBox uses the DisplayMember property to determine which
member on the items in the list is used for display purposes. If you have
not populated this, then the CheckedListBox will call ToString on the items
in the list and then use that for the display. So, to change what is shown
in the list, you will have to change something on the item that will change
the property exposed by DisplayProperty (if it is set), or you will have to
change the object in some way that will change what ToString outputs.

Of course, you might just want to remove the item and then add a new one
in its place.

Hope this helps.
 
Back
Top