Hi,
how can I read value of dynamic MaskedTextBox created in GroupBox?
private void add_groupbox(int x, int y, int id)
{
GroupBox gb1 = new GroupBox();
MaskedTextBox mtb1 = new MaskedTextBox();
MaskedTextBox mtb2 = new MaskedTextBox();
MaskedTextBox mtb3 = new MaskedTextBox();
mtb1.Location = new Point(46, 18);
mtb1.Size = new Size(53, 20);
int id_3 = id * 3;
label1.Name = "maskedTextBox" + (id_3-2).ToString();
mtb2.Location = new Point(148, 18);
mtb2.Size = new Size(53, 20);
label1.Name = "maskedTextBox" + (id_3-1).ToString();
mtb3.Location = new Point(328, 18);
mtb3.Size = new Size(53, 20);
label1.Name = "maskedTextBox" + id_3.ToString();
gb1.FlatStyle = FlatStyle.Flat;
gb1.Controls.Add(mtb1);
gb1.Controls.Add(mtb2);
gb1.Controls.Add(mtb3);
gb1.Size = new Size(394, 44);
gb1.Location = new Point(x, y);
gb1.Text = id.ToString();
gb1.Name = "groupBox" + id.ToString();
Controls.Add(gb1);
}