Click here to Skip to main content
11,805,604 members (57,337 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#2.0 C#3.0 C# Visual-Studio C#4.0 , +
I have run into a problem. On my form I have a richtextbox with text. My question is: Is there a way to horizontally and/or vertically mirror my text? or at least mirror my entire control? I have read that one possible solution would be to capture the image of the RichTextBox and follow the way about mirroring the image. However I believe this method would be very, very slow. Is this my only solution?

Thank you.
Posted 8-Jun-12 22:24pm
Mike Hankey at 9-Jun-12 9:35am
"horizontally and/or vertically mirror my text" What does this mean?
If you are wanting to keep a duplicate copy of the text use the OnTextChanged event and/or the .Text property.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

That is a nice question. Here is a post, which mirrors a text using OnPaint event of a form. You may use OnPaint event of your RichTextBox to do the same thing for your control:[^]

I hope it helps,
vlad781 at 10-Jun-12 19:33pm
I have successfully been able to draw my control to a bitmap, but I am having a problem here because my rich text box has an automatic scrolling feature. And... Well, drawing to bitmap, or OnPaint, will force me to draw out the control EVERY time a pixel is scrolled. A this will slow the application and b that is just terrible. I am still looking for a way to do this as raichtextbox.rightoleft only mirrors the control itself and not the text.

I still give you a 4. Its just not exactly the best way to do what I am trying to do.
Reza Ahmadi at 10-Jun-12 23:51pm
Well, thanks. I will inform you if I find a better way
Jαved at 11-Jun-12 9:52am
Good answer +5!
Reza Ahmadi at 11-Jun-12 11:33am
Thanks Javed! I am happy you find it useful.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 300
1 Richard Deeming 225
2 Sergey Alexandrovich Kryukov 170
3 ppolymorphe 125
4 Abhinav S 118
0 OriginalGriff 3,300
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web02 | 2.8.151002.1 | Last Updated 9 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100