#940 – Easy Selection of Entire Words in a TextBox

By default, as the user drags the mouse in a TextBox while holding the left mouse button down, text is selected one character at a time.

For example, in the TextBox shown below, if I click in the middle of the word “years” and drag the cursor into the middle of the word “later”, a portion of each word is selected.



If you want a user to easily select entire words within the text, you can set the AutoWordSelection property of the TextBox to true.  Now, as I drag the cursor into the second word, both words are automatically selected.



Even with auto word selection enabled, the user can select a portion of the word by selecting the full word and then moving the cursor backwards.