Printing fields size oddness

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Printing fields size oddness

Post by gyroscope » Wed Jul 09, 2008 11:06 am

Hi, if I select a field then choose File > Print Field... the text prints out fine.
But if I use scripting in a Print button:

Code: Select all

 on mouseUp pMouseBtnNo
 revShowPrintDialog false, true
  revPrintText field "XYZ"
 -- set the printscale to .5
end mouseUp
then the text prints almost double the typesize.

Is this a known buglet, or should I be adding something else in the script perhaps? (I tried printScale but that didn't make any difference)...

:?

PS In my web googlings, I discovered a useful site for comparing screen type, and is also useful for a definitive list of Windows and Mac default fonts...
http://typetester.maratz.com/

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Wed Jul 09, 2008 11:59 am

Try the 'revPrintField' command, rather than the 'revPrintText' command.

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Post by gyroscope » Wed Jul 09, 2008 12:12 pm

Thank you Jan, that did the trick. :)

PS For info for anyone who doesn't know, I've just found that it says in the Dictionary:

Important! The revPrintField command does not accept direct field references. For example, the following statement causes an error message:

revPrintField field "My Field" -- CAN'T USE THIS FORM

Instead, use a form that evaluates to a field reference, like this:

revPrintField the name of field "My Field" -- use this form instead
revPrintField ("field" && quote & "My Field" & quote) -- or this

:)

Post Reply