Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing a StringGrid

Status
Not open for further replies.

Fleabit

Programmer
Nov 16, 2002
14
US
I am trying to print a StringGrid control in Delphi 5 without much luck. Using
StringGrid1.PaintTo(Printer.Handle,0,0)
gives me a postage stamp sized printout on the paper. Selecting Fit To Page in a PrintDialog has no effect.
Trying StringGrid1.PaintTo(ABitMap.Handle,0,0)
Printer.Canvas.StretchDraw(ARect, ABitMap)
gives a blank page.
Anyone have a way to make a readable print out?
 
If only it was as easy as that, AFAIK you will have to extract the info from the grid and re-fromat it for the printer object. Maybe you could use Quick Reports to do the drawing for you.
If anyone else does know a way to implement your shortcut, I would love to know it!



Steve

Life is like a Grapefruit, sort of orangey-yellow and dimpled on the outside, wet and squidgy in the middle, it's got pips inside too. Oh and some people have half a one for breakfast. Ford Prefect.

Want to do more with TGML Download Star
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top