S4E

S4E

  • NA
  • 33
  • 0

CheckedListBox.setItemChecked

Oct 12 2004 4:27 AM
Does anyone know how I can get the checked items to actually display themselves if I update checked state for any of them within Form1_Load with code like: this.CheckedListBox.SetItemChecked(0, true); I've examined the values of the items (after setting code like above) and the expected values are confirmed BUT I still see no checks. E.g.: MessageBox.Show("CheckedCount: " + this.CheckedListBox.CheckedItems.Count.ToString() + ", item 0: " + this.CheckedListBox.GetItemChecked(0).ToString() + ", item 1: " + this.CheckedListBox.GetItemChecked(1).ToString()); This results in something like: 2, item0: true, item1: false. BUT still no visible checks are seen!!!! (I'm aware that the CheckedListBox control has some issues with it forgetting checks but this is slightly different since I'm not doing things like switching tab pages, which I believe can cause such problems.) Anyone know what the problem is???

Answers (2)