TextBox - Can I keep the selection highlight when it loses focus?
Asked Answered
A

2

14

I would like to have a regular TextBox on my form, where the selected text is still highlighted even if you use another control, e.g. push a button.

Does anyone know a way to achieve this (without using a RichTextBox which is not suitable for what I am doing).

Ary answered 27/5, 2010 at 12:55 Comment(0)
H
20

Sounds like you are looking for the HideSelection property:

Gets or sets a value indicating whether the selected text in the text box control remains highlighted when the control loses focus.

Hagan answered 27/5, 2010 at 12:58 Comment(0)
P
10

The HideSelection property is your friend. Set it to false and you should get what you are looking for. I never quite understood why the default is true.

Putrefaction answered 27/5, 2010 at 12:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.