Hello I am creating a windows form application, I am trying to create and add a new Control in this case it is a Panel from a different class, however when I have created the Panel and added it to the form it doesn't appear? [NOTE: I can change the text of the form with F.text("Some text"); but F.Controls.Add(panel1); doesn't work].
Here is my code:
public static void Create(Form1 F)
{
//this works:
F.Text = "DEFAULT TEXT";
Panel test = new Panel();
test.Dock = DockStyle.Fill;
test.BackColor = System.Drawing.Color.Black;
test.Show();
//this does not:
F.Controls.Add(test);
}