title: Why label overLapping on text box in win form c# while generating dynamic text box and label?
body: <pre><code>try
  {
      int txtno = 10;
  
      int Textbox_pointY = 15;
      int label_pointY = 15;
  
      int label_pointX = 10;
      int Textbox_pointX = 75;
  
      panel1.Controls.Clear();
      for (int i = 0; i &lt; txtno; i++)
      {   //Lable creation
  
          Label lbl = new Label();
          panel1.Controls.Add(lbl);
          lbl.Text = "Test_" + i;
          lbl.Location = new Point(label_pointX, label_pointY);
  
          label_pointY += 22;
          //Text box creating 
          TextBox a = new TextBox();
          panel1.Controls.Add(a);
          a.Text = (i + 1).ToString();
          a.Location = new Point(Textbox_pointX, Textbox_pointY);
  
          //panel1.Show();
          Textbox_pointY += 22;
          //label_pointY += 5;
      }
  }
  catch (Exception)
  {
      MessageBox.Show(e.ToString());
  }
  </code></pre>
  
  <p>When dynamically generate label and <code>enter code here</code>text box in winform c# Label overlaps over textbox .I need to keep text box closely to label text .I have added my code here . </p>