Rano AH

Rano AH

  • NA
  • 176
  • 108.9k

TextBox Properties and setting initial values to textBoxes

Apr 15 2014 2:17 AM

Hi


I have a problem with 3 textBoxes. I need to set an inital value (texts) for each textBox
and when I need to change / rewrite a value in one of the textBoxes then the applicaiton will allow me to do so.

I tried to set the text for each textBox from the TextBox properties >> Text. but this doesn't display the
value in the textBox. and if I set the following:

private void TextBox1_TextChanged(object sender, EventArgs e)

{
TextBox1.Text = "InitialText1";
}

private void TextBox2_TextChanged(object sender, EventArgs e)

{
TextBox1.Text = "InitialText2";
}

private void TextBox3_TextChanged(object sender, EventArgs e)

{
TextBox1.Text = "InitialText3";
}


This will show the value in the textBox but will not allow me to change it at the run time.

What shall I do?


Answers (4)