Re: How to load rtf in richtextbox with header and footer



On Tue, 04 Mar 2008 22:14:36 -0800, sahil <khaleek_ahmad@xxxxxxxxxxxxxx> wrote:

Hi everyone,

I am trying to load an rtf in a richtextbox with header and footer
but i am not able to do that.
Can any one tell how i can do this.

Maybe you could be more specific. Are you expecting the document-level RTF codes that specify a header and footer to work inside a RichTextBox?

If so, it doesn't surprise me at all that that doesn't work. The RichTextBox uses RTF as the formatting interface, but that doesn't mean that it supports everything that RTF does. I would only expect things that pertain to formatting the text itself to have any effect. Margins, page breaks, headers/footers, etc. are all things that I would not expect to be relevant when there's not any document page to relate those items to.

Or is there any other control in C# that can solve my problem..

Without more specifics regarding what you really expect to happen, it's hard to say. But no, I don't think that there's a control that works like a page.

On the other hand, you might try using the built-in print-preview support. That _does_ operate basically on a page level, and if you embed it into your own control that could produce the visual results you're looking for (albeit at a significant performance cost, since you'd be dragging the printer driver into the processing).

Of course, depending on what visual results you're really looking for, it's possible that a few RichTextBox controls directly next to each other would serve your purpose. Or that some sort of simple custom control might as well. Like I said, it's hard to say without a more specific problem description.

If you have any solution than please mail me at
khaleek_ahmad@xxxxxxxxx

I guess no one ever bothered to tell you that it's VERY rude to post a question on a newsgroup and then ask for replies to be emailed to you.

If your question is important enough for you to post it here, it's important enough for you to read the answer here.

Pete
.



Relevant Pages

  • RE: Effective coloring in RichTextBox
    ... Making RTF code by hand appeared on my mind, but that's what I didnt want to ... This control is a superset of the RichTextBox control. ... RichTextBox control with the ability to capture, recognize, and display ink. ... manually and avoid the calling of SelectionColor ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Inserting contents of Word document into a richtextbox control
    ... As you've discovered the RTF control expects an RTF ... >richtextbox text as the activedocument contents but this is too clumsy ... After searching in groups I realised that Word doesn't use ...
    (microsoft.public.word.vba.general)
  • How to load rtf in richtextbox with header and footer
    ... I am trying to load an rtf in a richtextbox with header and footer ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Rich Text parsing with RichTextBox
    ... > color from the RTF strings. ... > RichTextBox doesn't seem to be able to understand my RTF. ... > rich text control. ... > SelectionColor still returns Color.Empty. ...
    (microsoft.public.dotnet.framework)
  • RE: Initializing a RichTextBox
    ... The Rtf property of RichTextBox gets or sets the text of the RichTextBox ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework.windowsforms)

Loading