Witam, tworząc dynamicznie button w groupBoxie da radę sprawdzić potem w któym groupboxie jest dany button?
GroupBox n = new GroupBox();
i += 1;
n.Text = "nr:" + i.ToString();
n.Location = new Point(X, Y);
n.Size = new Size(350, 22);
tabPage4.Controls.Add(n);
Button b = new Button();
b.Text = "TEST";
b.Location = new Point(712, 19);
b.Size = new Size(32, 23);
n.Controls.Add(b);
b.Click += new EventHandler(bCLICK);
void bCLICK(object sender, EventArgs e)
{
//MessageBox.Show("klikles w button, ktory jest w groupboxie...");
}