I want to turn off the text selection and click on the middle of the text in the TextBox, but the user should be able to enter this TextBox and write at the end of the earlier text, so I cannot make it ReadOnlyor Enable = false.
I am trying to process MouseDownand do the following:
input.Select(input.Text.Length, 0);
This helps with placing the cursor in the middle of the text, but the user can still make a selection from the end.
I also do the MessageBox()on event MouseDown, but in this case the user cannot click on the textBox and write anything.
The last attempt was to set focus()in another control and focus, after some time, but that did not work. The user can still make a choice.
How can i do this?
source
share