-
Feb 13th, 2012, 01:10 AM
#1
Thread Starter
New Member
Not allowing user input in text box.
I am using a text box to display a list of items in which I want to be for reading only. Is there any way that I can not allow user input into this text box? Right now I have the text changed set to show an error message, that works but the text entered before the message box appears, still shows. Thanks for the help.
-
Feb 13th, 2012, 01:12 AM
#2
Addicted Member
Re: Not allowing user input in text box.
Set the ReadOnly property to True
-
Feb 13th, 2012, 04:29 AM
#3
Addicted Member
Re: Not allowing user input in text box.
Why don't you use a label?
-
Feb 13th, 2012, 10:50 AM
#4
Re: Not allowing user input in text box.
I'd use a label. A textbox is there for entering or editing text. The user expects that if they see a textbox, then they should be allowed to interact with it. By showing them a textbox and preventing them from ever doing anything with it, you just frustrate learners, which is bad design. One thing you could do that would be somewhat better would be to disable the textbox. That would at least give the user some visual cue that they are not to be entering anything into the textbox. If you leave it enabled and do ANYTHING to prevent entry or editing, you will just annoy people.
My usual boring signature: Nothing
-
Feb 13th, 2012, 03:39 PM
#5
Junior Member
Re: Not allowing user input in text box.
If you're displaying a list of items it sounds like you should be using a listbox.
-
Feb 13th, 2012, 07:23 PM
#6
Thread Starter
New Member
Re: Not allowing user input in text box.
I can't use a lable because my book tells me to use a text box. I would, rather use a lable believe me. Lol
-
Feb 13th, 2012, 09:47 PM
#7
Re: Not allowing user input in text box.
As acrym's already pointed out, set the TB's ReadOnly property to True.
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
|