Ciao a tutti
ho creato nella mia applicazioni una serie di textbox inclusi in un foreach:
come vedete il txtSondaCisterne ha un evento TextChanged:codice:List<string> pippo = entita.cisterneSP("21").ToList(); foreach (var item in pippo) { TextBox txtNomeCisterna = new TextBox(); txtNomeCisterna.Text = item; txtNomeCisterna.Name = item; txtNomeCisterna.Font = new Font("Microsoft Sans Serif", 8, FontStyle.Bold); txtNomeCisterna.Width = 32; flowLayoutPanel1.Controls.Add(txtNomeCisterna); TextBox txtSondaCisterne = new TextBox(); txtSondaCisterne.Font = new Font("Microsoft Sans Serif", 8, FontStyle.Regular); txtSondaCisterne.Width = 32; txtSondaCisterne.TextChanged += new EventHandler(txtSondaCisterne_TextChanged); flowLayoutPanel2.Controls.Add(txtSondaCisterne); TextBox txtMetriCubiCisterne = new TextBox(); txtMetriCubiCisterne.Font = new Font("Microsoft Sans Serif", 8, FontStyle.Regular); txtMetriCubiCisterne.Width = 70; flowLayoutPanel3.Controls.Add(txtMetriCubiCisterne); }
in questo evento ottengo una stringa che vorrei visualizzare nel txtMetriCubiCisterne.
praticamente qoello che sto cercando di fare è:
txtMetriCubiCisterne.Text = stringa risultato dell'evento txtSondaCisterne.TextChanged

Rispondi quotando