Article Preview
Buy Now
COLUMN
Printing 201
The basics of printing styled text
Issue: 9.4 (May/June 2011)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 15,088
Starting Page Number: 72
Article Number: 9409
Resource File(s):
9409.zip Updated: 2011-05-02 17:49:28
Related Link(s): None
Excerpt of article text...
In our last issue I introduced the topic of printing by demonstrating a print-preview feature. However, that example did not support styled text. Today we'll look at printing styled text using Real Studio's
styledTextPrinter
object.In the previous demo, any text formatting we did programmatically, via our printing code. For instance, I had a "title" checkbox that if you checked it, would center and bold the first lines of the text (presumably title and author, at least in the included example text). Today I've taken that same sample story and created an RTF file of it. This will preserve the text's formatting.
To do that, we first need to make our textArea support styled text by checking the
styled
property. Then in itsOpen
event we put this code:
Sub Open()
dim tin as textInputStream
...End of Excerpt. Please purchase the magazine to read the full article.