Recent

Author Topic: Display a memo at preview but not print it  (Read 2458 times)

derles

  • New member
  • *
  • Posts: 31
Display a memo at preview but not print it
« on: August 05, 2016, 10:47:16 pm »
Hello,
In a report I have a memo that I need to be displayed in the preview, but not printed on paper.

Why do I need this? Because this report will be printed on colored paper (blue, yellow, green or pink), and I need to display a large colored rectangle (FillColor property) for reference only in the preview, so that the operator can check the correct paper in the printer.

A BeforePrint event could be helpfull. Sadly it doesn't exists.

Can anybody help me with this?

Thankssss.

Daniel
« Last Edit: August 08, 2016, 02:40:01 pm by derles »

derles

  • New member
  • *
  • Posts: 31
Re: Display a memo at preview but not print it
« Reply #1 on: August 05, 2016, 10:51:04 pm »
Changing de Page background color could be usefull too, instead using a colored memo.
But my problem remains: display at preview, but no print on paper.
« Last Edit: August 08, 2016, 02:38:16 pm by derles »

Thaddy

  • Hero Member
  • *****
  • Posts: 8458
Re: Display a memo at preview but not print it
« Reply #2 on: August 06, 2016, 10:27:31 am »
In Delphi I used to substitute the printer.canvas with a normal TCanvas and render the output to that canvas. I guess that should be possible in Lazarus too.
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.