I have a problem when I try to add a new control to the panel control, I'm sure its a newbie problem but still I can't go around it!
What I'm trying to do is to create a new control which well be only one panel control and in it twelve text box (array of text box).
I'm also adding the code
קוד: בחר הכל
public partial class MonthPick : Control
public const int arrSize = 12;
TextBox boxArr = new TextBox[arrSize];
//the problem is with the next line
panel1.Controls.Add = boxArr;
private void initBoxArr(TextBox boxArr, int arrSize)
for (int i = 0; i < arrSize; i++)
boxArr[i] = new TextBox();
protected override void OnPaint(PaintEventArgs pe)
I just don't know how to add the array of text box's
The error that I receive is this:
Cannot assign to 'Contains' because it is a 'method group'