Hi
Does it have a property or something like this that put a textbox in read only mode without putting the text in gray. I would like the text stay black.
I just don't want the user enter key in that textbox
Thanks in advance
I tried it but it doesn't do anything,
It written in the description of the locked property "The Locked property determines if we can move or resize the control"
So it seems like it's not what I'm looking for.
1. Set the ReadOnly property to TRUE. By default, the backcolor will change to gray; the forecolor will not be changed (black). If you want change the backcolor back to white.
2. Do it programmatically. E.g. write "e.Handled = True" in the KeyPress event handler. User cannot enter text, UNLESS he uses Cut/Copy/Paste.
3. Do not use a textbox, but a label control. This could fit you if you want to display only.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.