use-revolution Digest, Vol 18, Issue 53

Karen Karen at curlypaws.com
Mon Mar 14 17:09:25 EST 2005


Dan,

Thanks for your reply.

After a lot of experimentation and hacking around, plus reading the
documentation and a very helpful tip from "Cubist" I came up with the
following code:

lock screen
    
set the formatForPrinting of stack "Stock Portfolio" to false
    
set the htmlText of field "PrintLayout" to the htmlText of field "List
Stocks"
set the tabStops of field "PrintLayout" to 160,220,290,360,430,500
set the textFont of field "PrintLayout" to "Courier New"
set the textSize of field "PrintLayout" to 10
set the printmargins to 36,72,36,72
    
set the formatForPrinting of stack "Stock Portfolio" to true
    
revShowPrintDialog false,true
revPrintField the name of field "PrintLayout"
    
unlock screen

All of which worked beautifully on the Mac - the printout looked just the
way that I wanted it.  On the PC, after some initial crashes, I hit problems
with all the text vanishing from labels, buttons and menus.  Printing worked
- if you could guess which menu option to select ;-).

Eventually it seemed to have some horrible effect on the Revolution stack
and I couldn't get the Windows version to work at all, even stripping out
the printing code.  I've now painstakingly rebuilt my stack from the last
good version and commented out the code above.  Any pointers on printing
would be a great help.

I'm still hoping for your book to appear which will no doubt explain lots of
these things - I'm sure that Runtime must have monks transcribing it from
the original in longhand judging by the time it is taking.  Hopefully they
are just finishing off the illustrations now... :-)

Karen


On 14/3/05 8:15 pm, "use-revolution-request at lists.runrev.com"
<use-revolution-request at lists.runrev.com> wrote:

> Message: 13
> Date: Mon, 14 Mar 2005 11:35:25 -0800
> From: Dan Shafer <revdan at danshafer.com>
> Subject: Re: Printing and fonts
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <1a47281a8b69e39e27c16afc3115628e at danshafer.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
> 
> 
> On Mar 13, 2005, at 6:55 AM, Karen wrote:
> 
>> Hi,
>> 
>> I'm trying to print tabular data from Revolution, and I'm having big
>> problems.  This is due to the font used to print - I don't seem to
>> have any
>> control over the font used, and therefore can't make it a font such as
>> Courier which would have consistent tabbing.
>> 
> First question: Windows or Mac? On Windows, you need to set the global
> property formatForPrinting to "true." On OS X, you don't have to worry
> about that.
> 
> Second question: what font is being used to display this tabular data
> in the stack? Can you just change it to Courier or some other
> monospaced font? Or does it *need* to be different between the screen
> and the printout?
> 
> The best/safest way I've encountered to print what you really want is
> to have a stack designed only to be printed, lay it out the way you
> want (including font settings), move data from the data stack to the
> printing stack as appropriate, and then print the printing stack. Have
> you tried that?
> 
> Dan
> 
>> Is there any way to set the output font?  Or any other way to ensure
>> that
>> tabular data lines up?
>> 
>> Thanks very much,
>> 
>> Karen
>> 




More information about the use-livecode mailing list