I have a masked textbox on my winforms application where if a user clicks inside of the masked textbox, the cursor will start out in that location. For example, if they click in the middle of the masked textbox there will be a blinking cursor in the middle. How can I get the cursor behavior to be such that it will default at the left-most portion of the masked textbox?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Carriage Return (ASCII chr 13) is missing from tex
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
You can hook into the click event and then do something like this:
into the click event :
(with this when you click on the maskedtextbox the cursor will appear at the left)
(with this when you click on the maskedtextbox the cursor will appear at the last char written, if the maskedtextbox is empty the cursor will appear at the left)