Printing with textAlign
J. Landman Gay
jacque at hyperactivesw.com
Mon Jan 31 00:03:32 EST 2005
On 1/30/05 10:36 PM, Dwayne Rothe wrote:
> Thanx for the reply Jaqueline,
> When the user selects the option of btn "left" or btn "center" the field
> to be printed is aligned before printing, this was done as a print preview,
> however rev still prints text as left alignment.
I had to go look at the script. Yes, it does seem like revPrintField is
ignoring the textalign. This should be submitted as a bug to Bugzilla.
If you don't know how, let me know and I will do it.
You can fix the problem yourself if you are brave enough to go tinkering
around in the guts of the IDE. Caveat: Work on a copy to be safe. You
can find the original revLibrary stack in the Components/global
environment folder on your hard drive. Make a copy of that first, before
changing the script.
Then do this:
1. In Revolution, go to Preferences and check the box "Revolution UI
elements appear in lists of stacks."
2. Open the Application Browser. In the left pane, find a stack called
"revLibrary". Click its arrow to display the single card. Click on the
3. On the right-side pane, right-click the button "revPrintBack" and
edit its script.
In the script editor, search for this line:
if pSourceFieldRef is not empty then
You may have to hit the Find button a couple of times to find the right
instance. Just under that, it should say:
set the tabStops of field 1 to the tabStops of pSourceFieldRef
Add a line after that one:
set the textalign of field 1 to the textalign of pSourceFieldRef
Close and save the script. Save the revLibrary stack. And cross your
fingers, because I didn't actually test it. Remember, I said make a copy. ;)
>>On 1/29/05 7:12 PM, Dwayne Rothe wrote:
>>>I am having a problem getting a field to print the text aligned center.
>>>I have two radio buttons to control alignment 1.) btn "left" 2.) btn
>>>I am using the handler below;
>>>set printmargins to 36,36,36,36
>>>set printTextFont to Tahoma
>>>if the hilite of btn "left" is TRUE then
>>>set the printTextAlign to left
>>>else set the printTextAlign to center
>>>revPrintField the name of fld "docs"
>>>printmargins, printTextFont work fine but not printTextAlign, it always
>>>prints aligned left.........hmmm :?(
>>The revPrintField handler probably is overriding your settings. You can
>>either write your own printing handler and avoid using Revolution's, or
>>easier, just set the text alignment of the field itself before printing.
>>Revolution will use the alignment in your field.
>>Jacqueline Landman Gay | jacque at hyperactivesw.com
>>HyperActive Software | http://www.hyperactivesw.com
> use-revolution mailing list
> use-revolution at lists.runrev.com
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the Use-livecode