Click here to Skip to main content
Rate this: bad
good
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 23:24pm
Comments
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
good
Please Sign up or sign in to vote.

Solution 1

hi,
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:
 
http://social.msdn.microsoft.com/Forums/en/csharplanguage/thread/0277054e-201a-4659-80cb-722789cd219c[^]
 
I hope it helps,
Cheers
  Permalink  
Comments
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 390
1 Sergey Alexandrovich Kryukov 329
2 BillWoodruff 210
3 Afzaal Ahmad Zeeshan 204
4 CPallini 185
0 OriginalGriff 5,515
1 DamithSL 4,451
2 Maciej Los 3,902
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,175


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 9 Jun 2012
Copyright © CodeProject, 1999-2014
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