Help with Centered Page Numbers
Posted: Mon Sep 17, 2012 3:49 am
I'm trying to print a field using the revPrintText command because I want to place a centered page number in the footer of the page, but I am having trouble getting the page number centered.
The following command, currently part of a mouseUp handler for a button on the card with the field I want to print, works fine -- if I wanted the page number set flush left:
The LiveCode dictionary entry on revPrint Text says the following:
I have tried a variety of possibilities:
1. Putting "tab &" after the second comma just results in "tab &' being printed just before the page number.
2. Putting the same text just after the first quote mark in the the third item of the command, produces the same result.
3. Putting "<%tab%>" just after the first quote mark in the third item of the command, indents the page number a few spaces.
4. Putting a second "<%tab%>" after the first one, also indents the text instead of centering it.
I've spent some time looking through the "User Guide", the LC Dictionary, the LC forum, the LC list archives, the tutorials, revOnline, and User Examples, without being able to locate any further information or examples of the correct code.
Any suggestions?
The following command, currently part of a mouseUp handler for a button on the card with the field I want to print, works fine -- if I wanted the page number set flush left:
Code: Select all
revPrintText the htmlText of field "Report", ,"-- <%pageNumber%> --"
What is not spelled out, or shown in any example I can find, is how to insert the tab characters into the commandThe headerText and footerText can contain up to two tab characters:
* Everything up to the first tab character is left-aligned.
* Everything between the first and second tab characters is centered.
* Everything after the second tab character is right-aligned.
If the headerText or footerText contain more than two tab characters, everything after the third tab is ignored.
I have tried a variety of possibilities:
1. Putting "tab &" after the second comma just results in "tab &' being printed just before the page number.
2. Putting the same text just after the first quote mark in the the third item of the command, produces the same result.
3. Putting "<%tab%>" just after the first quote mark in the third item of the command, indents the page number a few spaces.
4. Putting a second "<%tab%>" after the first one, also indents the text instead of centering it.
I've spent some time looking through the "User Guide", the LC Dictionary, the LC forum, the LC list archives, the tutorials, revOnline, and User Examples, without being able to locate any further information or examples of the correct code.
Any suggestions?