The idea is to create textbox controls with diferents names
This part of the code is wrong
TextBox "txt" + mes + "_" + cod_uni_neg = new TextBox();
Help me to correct it please...
public TextBox CrearControl(string mes,string cod_uni_neg)
{
TextBox "txt" + mes + "_" + cod_uni_neg = new TextBox();
textBox1.Wrap = true;
textBox1.ReadOnly = false;
textBox1.Enabled = true;
textBox1.Visible = true;
textBox1.Text = "YEAH";
textBox1.Width=29;
textBox1.Height =12;
textBox1.BackColor = Color.Red;
return "txt" + mes + "_" + cod_uni_neg ;
}
Thanks a lot
Norman Yuan - 29 May 2006 19:54 GMT
public TextBox CrearControl(string mes,string cod_uni_neg)
{
TextBox txt=new TextBox();
txt.Name="txt" + mes + "_" + cod_uni_neg;
//Set other TextBox properties
....
return txt
}
Of course you will add this newly created TextBox into Form's Controls
collection or other control container (which will be added to Form's
Controls connection eventually).
> The idea is to create textbox controls with diferents names
>
[quoted text clipped - 31 lines]
>
> Thanks a lot