Hello Daniwebbers
I have a 2 dimentional control array which gets added to it programatically. There's a lot to add to it but i have already stumbled at the first hurdle.
I keep getting the standard "Object reference not set to an instance of an object." error when the first control is added.
Control array is initialised:
Control[ ][ ] TControls = new Control[6][];
Controls are added:
t = 1;
TControls[t][1] = new GroupBox();
TControls[t][1].Visible = false;
TControls[t][1].Parent = gbtasks;
TControls[t][1].Name = "t" + (t + 1).ToString();
TControls[t][1].ForeColor = Color.SeaGreen;
TControls[t][1].Text = (t + 1).ToString();
TControls[t][1].Size = new Size(262, 42);
if (t == 1)
TControls[t][1].Location = new Point(3, 68);
else
TControls[t][1].Location = new Point(3, 68 + (43 * (t - 1)));
TControls[t][1].MouseEnter += new EventHandler(TEnter);
thank you very much for your help