Click here to Skip to main content
14,326,017 members
Rate this:
Please Sign up or sign in to vote.
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
Q no.1.Attempt All marks=10
1.question 1 marks=2
2.question 2 solve marks=4
are Displayed in Any Format.i.e. the format is not give me some solution to 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.
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?
Toli Cuturicu 25-Dec-10 17:29pm
Rate this:
Please Sign up or sign in to vote.

Solution 2

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.
Rate this:
Please Sign up or sign in to vote.

Solution 1

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.
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.
Rate this:
Please Sign up or sign in to vote.

Solution 3

Eddy Vluggen 25-Dec-10 13:42pm
Good find! - I'm using <a href="">A Professional HTML Renderer You Will Use</a>[<a href="" 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.
Espen Harlinn 26-Feb-11 17:10pm
Well, and now that you're pushing 50K - you get far better responses :)
Sergey Alexandrovich Kryukov 26-Feb-11 20:24pm
I wonder if it is so and why? :-)
Thank you.

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

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