c# - How clear two RichTextBox using CheckedListBox and button -
can me, how can clear content inside richtextbox using 1 button where: checkedlistbox - select of rtb cleared?
i have problem checkedlistbox - works 1 select position, not checked/marked.
private void button1_click(object sender, eventargs e) { (int = 0; < checkedlistbox1.items.count; i++) { if (checkedlistbox1.getitemchecked(i)) { string str = (string)checkedlistbox1.items[i]; if(str == "rtb1") { richtextbox1.clear(); richtextbox1.focus(); } if(str == "rtb2") { richtextbox2.clear(); richtextbox2.focus(); } } }
Comments
Post a Comment