Thanks. Here's an off topic question: I have a string that shows in the listbox. But there is a numeric value associated with it, which I don't want displayed. I'm storing both in the listbox and parsing to get the value part. But both are displayed, which I don't want. Is there a better way to do this?
Main Topics
Browse All Topics





by: Zephyr__Posted on 2007-02-12 at 17:51:24ID: 18520019
Hi, you can accomplish that by handling the ItemCheck event of the CheckedListBox like:
object sender, ItemCheckEventArgs e) kedItems.C ount > 0)
private void checkedListBox1_ItemCheck(
{
if (this.checkedListBox1.Chec
e.NewValue = CheckState.Unchecked;
}
The above code checks if any items are checked, if there is one it doesn't allow a new item to be checked.