[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Text Alignment
Todd,
I don't recall seeing a response to your inquiry, and didn't find one
(subject-wise) in the archives, so...
On Fri, 4 Jun 1999, Todd Becker wrote:
> I originally created a report using VisualSqribe. ...
> When I began editing the SQR file, I noticed that the text was centered
> using a calculated position rather than the CENTER attribute of the
> PRINT function. ...
> Has anyone encountered any difficulty using the CENTER attribute? Is it
> standard practice to always calculate text positions?
In VisualSqribe, yes. VisualSqribe, by default, uses the "graphical"
method of declaring the line-height and char-width to be 1 point each.
This gives you a 1 point by 1 point grid for exact placement of objects.
The center option of the print command will then center the text as if
each character were 1 point wide (which of course, is not the case). If
you do not need the 1 x 1 grid, you can change VisualSqribe to use a
character based layout.
> I would like to be able to create a standard header, with centered
> text, that can be used as an #include file, regardless of the
> orientation of the page.
If you need the 1 x 1 grid for all of your reports you can use the
$sqr-max-columns pre-defined variable (as of 4.3.2) to calculate where to
print text for centering. If your char-width changes between reports,
you'll need to set a variable or #define a value to let the header
procedure know the current char-width that was used to set the
$sqr-max-columns value. And of course, if you change point-size within the
header, you'll have to figure in an adjustment for the width of the
different point sizes. I think the actual character width (in points) of
the default courier font is 0.6 times the point-size.
HTH,
-----------------------------------------------------------------------
Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/
donm@ontko.com | "In the beginning, there was nothing, which exploded"