0

Hi I have 50 splitcontainers.. i want to read all the splitcontainers & its panels programmatically...Is it possible...?

Because the below code only reads Splitcontainer4 & Panel1, But Iam looking to read all the splitcontainers and its panels programmatically...

foreach (Control Ctrl in this.splitContainer4.Panel1.Controls)
            {
                if (Ctrl is RichTextBox)
                {
                    ((RichTextBox)(Ctrl)).KeyPress += new KeyPressEventHandler(this.Common_KeyPress);
                }
            } 

Thanks for ideas...

Regards PARAMU

Paramu
  • 613
  • 2
  • 10
  • 23
  • Duplicate: http://stackoverflow.com/questions/6094410/how-to-read-richtextbox-controls-inside-all-splitcontainers – Smudge202 May 23 '11 at 10:28

1 Answers1

1

Find all the splitcontainers see SO question here and check both panels for the desired controls.

Community
  • 1
  • 1
Henrik Gering
  • 1,769
  • 16
  • 29