Global Procedure "Problem"
Hi, I have a global procedure along the
lines of:
SetFont(xx: TppDBText);
begin
..call a function to get a font name and then
xx.Font.Name := thenewfontname;
end;
In ReportBeforePrint, if I use
SetFont(aName);
the font for the aName does not change.
If I copy the code from the global procedure
into the ReportBeforePrint code, the font does
change.
Is there a problem, with trying to set a font
this way? (or am I doing something stupid again?)
Thanks.
lines of:
SetFont(xx: TppDBText);
begin
..call a function to get a font name and then
xx.Font.Name := thenewfontname;
end;
In ReportBeforePrint, if I use
SetFont(aName);
the font for the aName does not change.
If I copy the code from the global procedure
into the ReportBeforePrint code, the font does
change.
Is there a problem, with trying to set a font
this way? (or am I doing something stupid again?)
Thanks.
This discussion has been closed.
Comments
Ignore that question, it turns out that if I use
var
theName: TppDBText;
begin
theName := aName; <== aName is a DBText on the report
SetFont(theName);
it passes nothing as far as I can tell. If I use
SetFont(aName);
it works. Intellectual curiosity compels me to ask
why the first doesn't work <g>. Thanks.