469,898 Members | 2,033 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Selection highlight visible for inactive control

GaryTexmo
1,501 Expert 1GB
This is driving me nuts, I can't find anything after numerous web searches, I'm hoping someone here has some insight. What I'd like is for the selected text on a control (rich text box in this case) to remain highlighted when the control is inactive.

To see an example of what I want, simply open notepad, type some things, select what you typed, then click another window. The text will remain highlighted even though notepad is inactive.

To see an example of what I don't want, create your own form in Visual Studio and put a multiline text box (or rich text box, doesn't seem to matter) on it. Run your app and type some things in the text box, then highlight it and leave focus on the form. The highlight magically disappears.

Any help would be greatly appreciated!
Jul 16 '09 #1

✓ answered by cloud255

Hi

There is a property called 'HideSelection' exposed by the RichTextBox control. Simply set this property to false and you will have the desired effect.

2 2546
cloud255
427 Expert 256MB
Hi

There is a property called 'HideSelection' exposed by the RichTextBox control. Simply set this property to false and you will have the desired effect.
Jul 17 '09 #2
GaryTexmo
1,501 Expert 1GB
That's exactly it, thank you! And now that you've pointed it out, it's painfully obvious... it's there for both a rich text box and a text box.

...can't find the forest for the trees...

Thank you again!
Jul 17 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Mark | last post: by
2 posts views Thread by ___Newbie___ | last post: by
2 posts views Thread by Bruce Stradling | last post: by
2 posts views Thread by Angus | last post: by
reply views Thread by Tom Van Hauwaert | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.