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?

how clear rtb using button , checkedlistbox

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

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -