Click here to Skip to main content
15,881,836 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hi All,

I got difference in string layout between .net control like rich textbox and outer text editor like notepad when I am using same string.

Kindly share the suggestion here.

Thanks in advance
Jayesh Rathod
Posted
Updated 4-Nov-14 3:42am
v2
Comments
Sergey Alexandrovich Kryukov 4-Nov-14 9:44am    
Not a question. Not clear. What is "string layout", why should it be the same or different? The documents are float documents by their nature. It makes no sense to assume any particular "layout".
—SA
jayeshkumar.rathod 5-Nov-14 0:48am    
Thanks Sergey

I wish i can upload image here so you can understand properly.!!

Well, yes - you would.
Notepad is a text editor: plain and simple. It only deals with the text, and doesn't worry about or use formatting codes.

A RichTextBox is different: it handles text, but it "wraps" them in formatting codes to provide additional features, like fonts, and bold, and underline.

If you get the content of a RichTextBox, it will contain these formatting codes so that it can display the material in the same way next time.
 
Share this answer
 
Problem is solved by setting font property of rich text box to "Consolas".

Thanks all
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900