Home Forums WinForms controls Other WinForms controls Text Selection on Focus in WinTextBox Reply To: Text Selection on Focus in WinTextBox

User (Old forums)
Member
Post count: 23064

A rew more WinTextBox questions:

1. If you have TextBoxArea.SelectOnFocus set to false, why won’t a WinTextBox keep the SelectionStart and SelectionLength state when you tab away then back to it? The standard Windows TextBox does.

2. Why does the WinTextBox always position the caret to the end of the text when it gets focus via the keyboard?

3. If you have TextBoxArea.SelectOnFocus set to true, all the text gets selected not only when you focus the control via a keystroke, but also when you give it focus via a mouse click. Standard windows behavior is to select all text only when focusing the control via the keyboard (I mean on data-entry type forms, not the few exceptions like the address bar in IE).

Any work-arounds for these?

Imported from legacy forums. Posted by Glenn (had 461 views)