C# changing the color of a text box when user enters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eddy556
    New Member
    • Feb 2007
    • 1

    C# changing the color of a text box when user enters

    Hey,

    Im having trouble making a textbox change colour when a user enters it. I have managed to textBox2.BackCo lor = Color.Pink; place that in the code which seems to work but I wish for it to only happen when a user enters it.

    This is what I have:

    private void textBox1_Enter( object sender, System.EventArg s e)
    {

    textBox2.BackCo lor = Color.Pink;

    }

    I cannot get it to work.

    Thank you :-)
  • nmsreddi
    Contributor
    • Jul 2006
    • 366

    #2
    Hello

    If you want to write it in any language just go for textbox text changed event it works well else if you want to use any script ,its better ,javascript can work well in your case

    Comment

    • chazcross
      New Member
      • Feb 2007
      • 31

      #3
      Is this for a windows form or ASP.NET?

      Comment

      Working...