Results 1 to 10 of 10

Thread: [2008] Richtextbox: Adding Header/Footer to contents

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    [2008] Richtextbox: Adding Header/Footer to contents

    When I print out the contents of my richtextbox...

    How can I add a header including text and a logo

    And a footer with say, the date and some text ??

    Thanks for any help.

  2. #2
    Hyperactive Member gnaver's Avatar
    Join Date
    Jul 2005
    Location
    Denmark/Sweden
    Posts
    289

    Re: [2008] Richtextbox: Adding Header/Footer to contents

    how do you print ?

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] Richtextbox: Adding Header/Footer to contents

    Haven't decided yet but Merrion's solution looks very attractive

  4. #4
    Hyperactive Member gnaver's Avatar
    Join Date
    Jul 2005
    Location
    Denmark/Sweden
    Posts
    289

    Re: [2008] Richtextbox: Adding Header/Footer to contents

    that i dont know then ...

    it would have been easy using drawstring and drawimage, but then i believe you would loose the text formatting of the rtb :S

  5. #5
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    Re: [2008] Richtextbox: Adding Header/Footer to contents

    Quote Originally Posted by Xancholy
    Haven't decided yet but Merrion's solution looks very attractive
    OK - add two hidden labels with your header / footer text and set the print properties for where on the page and how you want them to print. If you want the label to change for each page (for example if your footer text is "Page n"..) then handle the PagePrinted event and update the label text in that...

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] Richtextbox: Adding Header/Footer to contents

    Quote Originally Posted by Merrion
    OK - add two hidden labels with your header / footer text and set the print properties for where on the page and how you want them to print. If you want the label to change for each page (for example if your footer text is "Page n"..) then handle the PagePrinted event and update the label text in that...
    Merrion, you lost me. Where exactly do I add the hidden labels ?

  7. #7
    Hyperactive Member gnaver's Avatar
    Join Date
    Jul 2005
    Location
    Denmark/Sweden
    Posts
    289

    Re: [2008] Richtextbox: Adding Header/Footer to contents

    on the form i guess, doesn't matter where, as you choose where to print in the print properties

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] Richtextbox: Adding Header/Footer to contents

    Still lost. I want to print the richtextbox contents only, not the form itself.

    So I add the hidden labels to the form and then ?

  9. #9
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    Re: [2008] Richtextbox: Adding Header/Footer to contents

    Set the extended properties provided by the MCL Form Print Helper component : Print = True, BoundingRectangle to where on teh page it goes etc.

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] Richtextbox: Adding Header/Footer to contents

    Thanks Merrion. For a footer on every page showing Page n of x, how would I set it up ? What would be the bounding rectangle dimensions ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width