|
-
January 13th, 2009, 07:30 AM
#1
How do I change the properties of a text box so the user cannot input text?
Hi All,
I am using C# visual express edition to code a windows form application. I have a text box, the user enters a string then presses a button on the form. I then want the text box to become inactive so the user cannot click on the text box and edit the information?
What is the code to change the text box to make it inactive? Any help would be much appreciated.
Thanks.......
-
January 13th, 2009, 07:34 AM
#2
Re: How do I change the properties of a text box so the user cannot input text?
use the ReadOnly or Enabled property
Code:
textBox1.ReadOnly = true;
//or use this
textBox1.Enabled = false;
-
January 13th, 2009, 08:07 AM
#3
Re: How do I change the properties of a text box so the user cannot input text?
Thanks mate- that works perfectly................
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|