Hi Stephen, The CheckListBox may contain several hundred items. Therefore printing a canvas is not what I want to do. I would much rather iterate thought the list and print a small bitmap representing a checked or unchecked check box followed by the text of the TCheckListBox item. Any examples of how I could to do that?
Mike ----- Original Message ----- From: "Stephen Posey" <[EMAIL PROTECTED]> To: "Delphi-Talk Discussion List" <[email protected]> Sent: Monday, December 12, 2005 3:28 PM Subject: Re: Printing Items in a TCheckListBox > M Tuttle (KS) wrote: > > > Greetings All, > > > > Doe anyone have any code snippet they could share that would allow me to > > print all items in a TCheckListBox and maybe show a difference between the > > items that are checked in the list versus those that are not checked. Maybe > > bold type for selected? Any ideas at all would be appreciated. > > Probably the simplest thing to do is copy the TCheckListBox's > canvas to the printer canvas or a bitmap's canvas as part of > setting up your printout. > > E.g.: > > Printer.Canvas.CopyRect( Rect(0, 0, 1500, 1500), > CheckListBox1.Canvas, > Rect( 0, 0, CheckListBox1.Width, CheckListbox1.Height )); > > If you need to have the text match up with other text in the > printout, you'll need to iterate the CheckListbox and build your > text based on its contents before adding it to the printout using > DrawText or whatever. > > If you can give a little more background on how you're setting up > the printing, I can probably be more precise. > > HTH > > Stephen Posey > [EMAIL PROTECTED] > > __________________________________________________ > Delphi-Talk mailing list -> [email protected] > http://www.elists.org/mailman/listinfo/delphi-talk > __________________________________________________ Delphi-Talk mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi-talk
