Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

textbox setfocus and back color change

Posted on 2008-10-09
3
Medium Priority
?
693 Views
Last Modified: 2012-05-05
Can anyone tell me how to set the setfocus to texbox and change the backcolor with my C# window application?

0
Comment
Question by:tommychiu
  • 2
3 Comments
 
LVL 22

Expert Comment

by:p_davis
ID: 22681554
               TextBox t = new TextBox();
            t.Focus();
                t.BackColor = Color.Blue;
0
 

Author Comment

by:tommychiu
ID: 22681986
actually I have couple of textbox, If I select the first textbox then the back color change to blue otherwise change it back to normal.
0
 
LVL 22

Accepted Solution

by:
p_davis earned 2000 total points
ID: 22682010
ok, if you select a text box then you have an enter event for each one or they can all share the same and in that you can set the backcolor as i have shown above.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Integration Management Part 2

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question