THPrint External

Here is where the magnanimous folks that create externals post them (.zip archives only please).

THPrint External

Postby sctell » Sun May 26, 2013 3:03 am

Here is an updated version of my external THPrint.

It takes tab/return delimited data and prints it out as a table using Cocoa's printing routines.

It is a lot quicker than trying to do it in SC by setting up fields.

The basic routines are:

get THPrint("createPrintView",gData,tCols,tLeftMargin,tRightMargin,tTopMargin,tBottomMargin,tLineSpace)
get THPrint("setTitleSpec",tShowTitles,tTitles,tFontName,tFontSize,tAlignment,tFillColor)
get THPrint("setColumnSpec",tFontName,tFontSize,tAlignment,tColPercentages,tOddColor,tEvenColor)
get THPrint("setGridSpec",tShowHorizGrids,tHorizGridColor,tShowVertGrids,tVertGridColor)
get THPrint("print")

There is an example of it's use in the "Print" button of the example.

Please let me know if you identify any problems and I will correct them.

All the best

(31.06 KiB) Downloaded 184 times
Posts: 1138
Joined: Sun Jul 06, 2008 10:41 am

Re: THPrint External

Postby Dan_Kelleher » Mon May 27, 2013 7:21 pm

Really Nice Terry. Thank you.

For newcomers, try drooping the project on SuperEdit, then select Select "Project Script" under the "Edit" menu to see how you would load the external (a copy of the bundle,"THPrint.bundle", located in the same folder as your project) into your project. Then doubleClick the window, then doubleClick the card, then doubleClick the "Print" button and click the "script" button in SuperEdit's Object Info Window to see how to set up your report in table form.

Thanks again Terry,
SC4.7.3 OSX 10.7.2 Mac Pro
User avatar
Posts: 438
Joined: Sun Jul 06, 2008 2:45 pm
Location: Worcester (wouster as in would) Massachusetts USA

Return to XCmds, XFcns, and XRtns

Who is online

Users browsing this forum: No registered users and 1 guest