K
Ken
Hello Everyone,
I am interested in creating a textbox array "AND" be able
to reference the textbox array in my code. Right now , I
am able to build textbox's , but I cannot refer to them in
my code . I think this is because they have not been built
till I hit a button. So, I have been told that maybe I
need to build a textbox array. I would appreciate a simple
example building a textbox array. And how to reference
each of them.
Here is what I have right now:
for(i = 0; i<= mytextboxcount - 1; i++)
{
holdtextbox1 = "";
holdtextbox1 = "txt" + + holdreportinfo[i,0];
TextBox mytextbox = new TextBox();
mylocy = mylocy + myspacing;
mytextbox.Text = "blah blah1";
mytextbox.Name = holdtextbox1;
mytextbox.Location = new System.Drawing.Point(mylocx,
mylocy );
mytextbox.Size = new System.Drawing.Size(mywidth,myheight);
mytextbox.Visible = true;
this.panel1.Controls.Add(mytextbox);
}
Thank You in Advance for your Help,
Ken
I am interested in creating a textbox array "AND" be able
to reference the textbox array in my code. Right now , I
am able to build textbox's , but I cannot refer to them in
my code . I think this is because they have not been built
till I hit a button. So, I have been told that maybe I
need to build a textbox array. I would appreciate a simple
example building a textbox array. And how to reference
each of them.
Here is what I have right now:
for(i = 0; i<= mytextboxcount - 1; i++)
{
holdtextbox1 = "";
holdtextbox1 = "txt" + + holdreportinfo[i,0];
TextBox mytextbox = new TextBox();
mylocy = mylocy + myspacing;
mytextbox.Text = "blah blah1";
mytextbox.Name = holdtextbox1;
mytextbox.Location = new System.Drawing.Point(mylocx,
mylocy );
mytextbox.Size = new System.Drawing.Size(mywidth,myheight);
mytextbox.Visible = true;
this.panel1.Controls.Add(mytextbox);
}
Thank You in Advance for your Help,
Ken