August 22nd, 2003, 02:06 PM
printing Kylix graphics pages
I'm developing Kylix GUIs that illustrate various configurations of our systems. I have nice pages filled with various components. How do I print these pretty graphics pages with the click of a button? Is there a utility within Kylix? So far, all I can find that's printable is the Canvas, but I'm not drawing on a Canvas. I want the entire GUI printed. How do I do it?
Comments on this post
August 26th, 2003, 11:57 AM
Dunno specifically about Kylix, but in my Delphi 6, the TForm component has a print method. All I did was this:
and it printed an image with all the components in my form. Hope this helps
procedure TForm1.Button1Click(Sender: TObject);
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
August 26th, 2003, 07:30 PM
Thanks for the suggestion, but it doesn't appear to work for me. Maybe I'm missing something else that needs to be done, for example something in the uses clause, or some other code somewhere. Or maybe Kylix is different from Delphi. I basically taught myself Kylix and Object Pascal in order to write these GUIs, so please don't assume I know anything. Any other suggestions?
August 27th, 2003, 12:52 AM
Kylix does definitively differ from Delphi.
Do your Controls have a PaintTo() method maybe? Also, in Delphi, a TForm has a GetFormImage() method, is this available?
August 27th, 2003, 01:02 PM
I'm not sure how to see if PaintTo exists in the Controls. If I try Form1.Controls.PaintTo I get an error, but I've seen PaintTo in a list of TControlStyle types, but I don't know how to use that. I also do not find a GetFormImage method available on my form.
All I want to do is a bitmap dump of the form, with all visible components, to a postscript file. Then I could spawn a system command to print the postscript file. There must be a way to do this.