checkedListBox remove items

I want to remove selected itemS from
checkedListBox1
on
button3_click
, but so far I succeed only at removing only one item ~_~ all other's tries ended up on not compiling or application crashes or just removes not all I need to (at least in visualization)
Last edited on
Solved. The main case was that checkedListBox1->CheckedItems->Count is descending
1
2
3
4
5
6
7
8
9
10
if(checkedListBox1->CheckedItems->Count != 0)
{
	String ^ s;
	while(checkedListBox1->CheckedItems->Count < 0)
	{
		s = String::Concat(s, checkedListBox1->CheckedItems[0],"\n");
		checkedListBox1->Items->Remove(checkedListBox1->CheckedItems[0]);
	}
	MessageBox::Show(s, "Istrinti is pasirinkimo saraso");
}
Last edited on
I see,
this language is C# ,not C++

Also a lot of newers can't make some differences from C# and C++
I noticed that C++ and C# are similar. But here it's C++/CLI.
What made you think that it is C#?
Last edited on
Topic archived. No new replies allowed.