This is a migrated thread and some comments may be shown as answers.

Best way to make all text Uppercase

1 Answer 79 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
danparker276
Top achievements
Rank 2
danparker276 asked on 16 Jun 2011, 12:17 AM
What would be the best way to make everything uppercase?  So even if the user types in lower case, it gets converted to upper case.

Would I do it in the DocumentContentChanged and move the cursor around?  Or is there an easier way?

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 17 Jun 2011, 04:55 PM
Hello Dan Parker,

Unfortunately, you cannot convert the text to upper case while the typing occurs. The solution would have been to handle the PreviewKeyDown event and check if Shift is pressed and CapsLock is on. You can find out about the Shift, but the CapsLock's state is out of reach.
The other approach - handling the DocumentContentChanged event will not work, as it is fired with some delay.

All the best,
Iva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
RichTextBox
Asked by
danparker276
Top achievements
Rank 2
Answers by
Iva Toteva
Telerik team
Share this question
or