Link to home
Start Free TrialLog in
Avatar of davev
davev

asked on

Selecting Text in RichTextBox

I have a small test project in which the main form contains a rich text box with some text. The AutoWordSelection property is false (this is the only property I change), but when I try and select something like "ample text in a ric" from the rich text box's text "This is sample text in a rich text box." by clicking and dragging through the text, the control still selects whole words, especially when I move over space characters. Is this a bug in the control or is there some other property or method I must set or use to get the behavior I'm after? Thanks in advance for any help you can provide.
Avatar of RonaldBiemans
RonaldBiemans

There is a bug there but there is an easy workaround

in the load of your form first set it to true and then to false

richtextbox1.autowordselection = true
richtextbox1.autowordselection = false

ASKER CERTIFIED SOLUTION
Avatar of RonaldBiemans
RonaldBiemans

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of davev

ASKER

One would think setting the property would be enough, but thanks for the simple solution, just the same.