Placing controls inside a panel in C#
<pre><code>private void newThumbNail(int docType, string fileName)
        {

            thmbNail[thmbNailCnt] = new GroupBox();
            thmbNail[thmbNailCnt].Parent = panel1;            
            thmbNail[thmbNailCnt].Visible = true;            
            thmbNail[thmbNailCnt].Location = new Point(2, 5);
            thmbNail[thmbNailCnt].Size = new Size(222, 50);



            picBox[thmbNailCnt] = new PictureBox();
            picBox[thmbNailCnt].Parent = thmbNail[thmbNailCnt];
            picBox[thmbNailCnt].Visible = true;
            picBox[thmbNailCnt].Location = new Point(6, 13);
            picBox[thmbNailCnt].Size = new Size(31, 31);
            //picBox[thmbNailCnt].Image = new Bitmap("images/excel.png");

            texBox[thmbNailCnt] = new TextBox();
            texBox[thmbNailCnt].Parent = thmbNail[thmbNailCnt];
            texBox[thmbNailCnt].Visible = true;
            texBox[thmbNailCnt].Location = new Point(53, 24);
            texBox[thmbNailCnt].Size = new Size(163, 20);
            texBox[thmbNailCnt].Text = fileName;
            texBox[thmbNailCnt].Enabled = false;

            Controls.Add(thmbNail[thmbNailCnt]);
            Controls.Add(picBox[thmbNailCnt]);
            Controls.Add(texBox[thmbNailCnt]);


        }
</code></pre>

<p>this is a function that dynamically adds a groupBox with some controls int it inside a panel. Unfortunately it does not appears inside the panel. The panel was created before hand using the c# design tools. It is placed directly on top of the windows form at 15,52 having a size of 279,489. Help please.</p>
