More questions regarding revPrintText II

Rob Cozens rcozens at pon.net
Wed May 29 09:19:01 EDT 2002


>I don't know about your other queries, but as far as the textAlign 
>goes, you could just set the text settings for the whole field 
>rather than specifying the range of characters. Just use:
>	set the textWhatever of fld "Print Formatter" to newSetting

Thanks for your suggestion, Sarah.

According to the Transcript Dictionary, "Getting the htmlText 
property reports a string consisting of the text of the field (or 
chunk of a field), with any font, size, style, or color properties 
embedded in the text in the form of the tags listed below."

On my first try (before I read the above), I set the font, size, and 
alignment of the field to the settings I wanted printed.  I got NO 
tags in the htmlText of the field because the properties were not 
embedded in the text. (In my working version, the field's textFont is 
symbol, textAlign is right [but the output is printed left aligned], 
and textSize is 1.) It seems there is no way of embedding a textAlign 
setting in the text.  If worse comes to worse, I can manipulate the 
left printMargin to center the text on the page; but I'd prefer 
something more straightforward (that doesn't add a new argument to 
the command).

Also, I can't find anything in the revPrintText documentation that 
explains what text settings are used to print plain text and how to 
change these defaults.

>In HTML, I think the center tag is now officially frowned upon, but 
>if you want to try it, I think it needs to be a tag on it's own 
>rather than an attribute of the P tag.
>e.g. <center> all your text </center>

I created a simple web page with a field containing three lines of 
text: line 1 is left justified, line 2 is center justified, and line 
3 is right justified.  When I view the page in Netscape, the 
justification is as specified.  If I set the htmlText of a Rev field 
to this text, all lines are left justified.  Replacing "<P 
ALIGN="CENTER"> with <center> did not change the alignment.
-- 

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)



More information about the use-livecode mailing list