The form window(chat window) that i am creating for a lan messenger is similar to the one in google talk with two textboxes. What i need to do is to transfer characters typed in the lower textbox(textbox2) to the upper textbox(textbox1 which is read-only) when i click the submit button without showing that textbox1 is read-only because the characters are appearing in grey.please help with code if possible.
+1
A:
Use a label for this instead of a textbox. If the only thing it is doing is display the characters and not a direct edit, you won't lose any functionality and the text would not be greyed out...
RSolberg
2009-02-26 06:16:33
please forward answers here: http://stackoverflow.com/questions/589273/read-only-textbox
Kent Fredric
2009-02-26 06:29:37
+1
A:
If you're going to use a Texbox, set it to Locked. That shouldn't gray the characters out. Otherwise in KeyDown/KeyUp events, set the e.Handled property to true (which will tell the box that you want to handle the input yourself and don't want the message to filter down).
That oughta do it for you.
Cyril Gupta
2009-02-26 06:27:17
please forward answers here: http://stackoverflow.com/questions/589273/read-only-textbox
Kent Fredric
2009-02-26 06:30:09