473,503 Members | 6,354 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Selection highlight visible for inactive control

GaryTexmo
1,501 Recognized Expert Top Contributor
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
2 2679
cloud255
427 Recognized Expert Contributor
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 Recognized Expert Top Contributor
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

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

Similar topics

4
3561
by: Mark | last post by:
How can I turn the selection highlight off when I enter a textbox? I tried setting SelLength to 0 but it still selected 1 character. Can I change the color of the selection highlight? I want to...
3
3426
by: JingleBEV | last post by:
Hi all, I have a masked text control that would return a date in string format via the mask property like: "9/23/2004" and i have a calendar control that would pop up when I click a command...
2
2139
by: ___Newbie___ | last post by:
Hello, I'm looking for a control that can display rows and columns similar to a table but highlight the entire row during selection? Listbox highlights the entire row but doesn't support...
2
1990
by: parm | last post by:
How do I highlight text in my first (tabindex = 1) asp control (eg: textbox) on the webform on page load. If I try to set focus using javascript then I get script error "Cannot move focus to...
11
1821
by: Xah Lee | last post by:
Of interest: • The Semicolon Wars, by Brian Hayes. 2006. http://www.americanscientist.org/template/AssetDetail/assetid/51982 in conjunction to this article, i recommend: • Software...
2
18086
by: Bruce Stradling | last post by:
I would like to have two tables. One I call SystemPropertyTypeTable which contains the defaults and the other UserPropertyTypeTable. Each has 3 fields. PropertyType, Description, Status. The...
0
1288
by: Franky | last post by:
I have a MDI form open and two child forms open in it. Each of the children contains a usercontrol which contains a richtextbox. The topmost form's caption bar is highlighted but I click on the...
2
3966
by: Angus | last post by:
I am trying to change the selection in Javascript - but this HTML element is not a standard option control. On the web page it looks like a dropdown list - and you click on the right hand down...
0
1053
by: Tom Van Hauwaert | last post by:
I designed a font "WAG Symbols" that contains symbols in the private use area of unicode. Now I want to develop an insertable object that can handle these characters so they become visible in, let's...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7291
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.