Solved

textbox setfocus and back color change

Posted on 2008-10-09
3
665 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

756 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