Hiding textbox text selection
Has anybody been able to find a way to hide the selection of text in a textbox control? I need to use a textbox instead of a label and have already implemented the ability to hide the caret but cannot find a way to not show the selected text as being highlighted. Any help would be greatly apprecaited.
Thanks!
Re: Hiding textbox text selection
Re: Hiding textbox text selection
Aren't you looking for the HideSelection Property ¿
Re: Hiding textbox text selection
Change the UseSystemPasswordChar (progerty of textbox) to true.
Re: Hiding textbox text selection
Tried all of these options and none seem to work. The control still enables a user to highlight the text inside of the textBox control when you click and drag the mouse to select the text of the textBox.
There might be some confusion over what I am looking for. I am looking to disable the ability to (1) put the mouse in the textBox and/or (2) disable the ability to drag and select text that is in the textBox.
Re: Hiding textbox text selection
If you have mentioned that in the first place, we would have known precisely what you wanted. :rolleyes:
Re: Hiding textbox text selection
I'm curious as to why you can't use a label. I only use a textbox as a label for 2 circumstances:
1) I need to a readonly display that will still allow the user to copy the data from the control.
2) I need to limit the viewable area of the control through the use of scrollbars.
I'm guessing you're dealing with number 2. If so, what's the problem with letting the user select some data out of the textbox? You can always set TabStop = false if that helps.