FTC 1.1 beta 2

FTC 1.1 beta 2 has been uploaded to the web site.

I enhanced and fixed a couple of problems with printing in this
beta. These changes were inspired by a customer wanted to print
independent of the FTC. The technique I showed him was to print
using an invisible window with an FTC control embedded in it. One
such window is called FTCConverterWindow. I use this window when
you want convert between the different formats (XML, RTF, and
text). You can use this technique for other things as you see fit.
I have included a sample piece of code that prints via the FTC and
an invisible window.

Here's what is new with this beta...

- Added a getLineCount to the FTDocument class.

- Enhanced the FormattedText class print method to take first and
last pages to print as parameters. If you leave them unspecified,
then the entire document will be printed.

- Added design time property called EditViewPrintMargin to specify
the margins for printing when in edit mode.

------

sample code:

Dim cw as FTCConverterWindow
Dim state as boolean
Dim g as graphics
Dim p as FTParagraph
Dim doc as FTDocument

' Has the printer set up dialog been run?
if app.doPageSetup(false) then

  ' Show the printer dialog.
  g = OpenPrinterDialog(app.getPrinter)

  ' Did the user confirm the print action?
  if not (g is nil) then

    cw = new FTCConverterWindow

    doc = cw.target.getDoc

    cw.target.setPageSize(8.27, 11.69)
    cw.target.EditViewPrintMargin = 0.5
    cw.target.setPrintMarginOffsets(0.5, 0.5, 0.5, 0.5)

    p = doc.addNewParagraph
    p.addText("line 1")

    p = doc.addNewParagraph
    p.addText("row 2")

    cw.target.print(g, app.getPrinter)

    cw.close

  end if

end if

FTC Website: 
http://www.truenorthsoftware.com/FormattedTextControl/FormattedTextControl.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in 
the subject field.



Other related posts: