Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
1.43/5 (7 votes)
See more:
I want to display the Question & marks in RichTextBox but i have one problem that they are not displayed Correctly.that is if
eg:
Q no.1.Attempt All marks=10
1.question 1 marks=2
2.question 2 solve marks=4
3.bmbdfbjbm,bmb,mbm,bm,b,jkjgjkgkjgkjgjkkkkkkkkkkkkkkkkkkkkkkkkfgggggggg
marks=6
are Displayed in Any Format.i.e. the format is not good.so give me some solution to that.so output i want is like
q no.1.Attempt all marks=10
2.vnnnnnnnnnnnnnnvnmvmnvmnbvmnbnbnm marks=2
3.;jljlj;l;ll;l;lknhklklnlkn marks=4 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
so what can i do please suggest me.
Posted
Comments
OriginalGriff 25-Dec-10 3:52am    
Sorry, but that is not clear at all.
Please edit your question, and try to explain what you are trying to achieve in better detail.
JF2015 25-Dec-10 3:52am    
Please edit your question to make it readable and understandable. What you posted does not really make sense.
Sandeep Mewara 25-Dec-10 3:58am    
A suggestion: Spend sometime formulating the question properly. Use real examples and not just any junk text.
Sergey Alexandrovich Kryukov 25-Dec-10 12:00pm    
Read-only use or not (important)?
Sergey Alexandrovich Kryukov 25-Dec-10 12:02pm    
System.Windows.Forms or WPF?

Edit your example text in an RTF-Editor (MS Word, WordPad) until it meets your criteria. Then have a look at the resulting RTF-Text, and use it as a template in your own control.
But as Eddy Vluggen said - RTF makes a lousy GUI - I'd use Html and WebBrowser-Control too.
 
Share this answer
 
The RichTextBox makes a lousy GUI. If you only need to display the answers with their marks, then generate some HTML and show it in a WebBrowser-control.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 25-Dec-10 11:47am    
WebBrowser wrapper control API is also very lousy, in different ways. I saw a wonderful open-source product (I think wrapped around RichTextBox), but I need time to find it.
Sergey Alexandrovich Kryukov 25-Dec-10 12:23pm    
I found it! please see my answer.
Eddy Vluggen: thank you. Your precise assessment and the refined technical term "lousy" refreshed my memory.
 
Share this answer
 
Comments
Eddy Vluggen 25-Dec-10 13:42pm    
Good find! - I'm using <a href="http://www.codeproject.com/KB/GDI-plus/HtmlRenderer.aspx">A Professional HTML Renderer You Will Use</a>[<a href="http://www.codeproject.com/KB/GDI-plus/HtmlRenderer.aspx" target="_blank" title="New Window">^</a>], since it also works on Linux (no WPF here). Bookmarked the CF-version, I'm sure it will come in handy one of these days :)
Sergey Alexandrovich Kryukov 25-Dec-10 15:38pm    
I inquired Jose Menendez for a WPF port. I'm pretty sure it can be well ported, or even someone else could create WPF solution based on WPF Rich edit.

What amazed me in Jose's work is the schema for internal references to project's resources. I never know anyone else inventing such a wonderful thing. And, generally, this code is stable. I really appreciated its quality after suffering from using IE wrapper for presentation in a really serious work. If I could get Jose's work by that time, it would save considerable part of my life.
Espen Harlinn 26-Feb-11 11:25am    
Nice links - my 5
Sergey Alexandrovich Kryukov 26-Feb-11 14:46pm    
Thank you, I like these works, especially first one which I tested well.
--SA
Espen Harlinn 26-Feb-11 17:10pm    
Well, and now that you're pushing 50K - you get far better responses :)

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