Solved

c# textbox highligted

Posted on 2011-02-20
5
284 Views
Last Modified: 2013-12-17
Hi,

I don't know how not highlight my textbox since when my form
loaded, for some reason my textbox is highligted.

Thanks,
JT
0
Comment
Question by:jtran007
  • 2
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
KiasChaos83 earned 250 total points
ID: 34939889
You haven't given much information to go off.. so I'm going to give you the dirty answer:

textbox1.SelectionStart = 0;
textbox1.SelectionLength = 0;

Open in new window

0
 
LVL 9

Expert Comment

by:s_chilkury
ID: 34939945
Do you mean the text inside the textbox is been selected when the form is loaded?
0
 

Author Comment

by:jtran007
ID: 34940232
Hi S_chilkury,

Yes. That's correct.

JT
0
 
LVL 9

Expert Comment

by:s_chilkury
ID: 34940320
The text box has a TabIndex of 0 and TabStop set to true. This means that the control will be given focus when the form is displayed.

You can either give another control the 0 TabIndex (if there is one) and give the text box a different tab index (>0), or set TabFocus to false for the text box to stop this from happening.
0
 

Author Closing Comment

by:jtran007
ID: 34940323
Thanks,
JT
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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…

828 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