#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    San Diego
    Posts
    3
    Rep Power
    0

    Question 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

    • Gran Roguismo agrees
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,616
    Rep Power
    4247
    Dunno specifically about Kylix, but in my Delphi 6, the TForm component has a print method. All I did was this:
    Code:
    procedure TForm1.Button1Click(Sender: TObject);
    begin
        Form1.Print;
    end;
    and it printed an image with all the components in my form. Hope this helps
    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
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    San Diego
    Posts
    3
    Rep Power
    0
    Scorpions dude:

    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?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    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?
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    San Diego
    Posts
    3
    Rep Power
    0
    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.

IMN logo majestic logo threadwatch logo seochat tools logo