Discussion:
Draw lines above text?
(too old to reply)
Roland Bengtsson
2007-07-03 11:27:04 UTC
Permalink
I have a report consisting of only text. It is columns of data built with PrintTab.
Now I want to draw a line slightly above and under a single line of text.
The problem seems to be that text cursor and graphic cursor is two different things.
How can I get the current graphic position of text so I can use it when drawing the line?

Regards Roland Bengtsson
Roland Bengtsson
2007-07-03 12:18:51 UTC
Permalink
Never mind, the issue is solved now.
This code works for me if someone else have the same problem :)

LongLine(aReport, XPos, Xpos + 195);

procedure TDeductionInvoiceReport.LongLine(const aReport: TBaseReport; StartX, EndX: Double);
begin
with aReport do
begin
MoveTo(StartX, FontTop);
LineTo(EndX, FontTop);
MoveTo(StartX, FontBottom);
LineTo(EndX, FontBottom);
end;
end;
Post by Roland Bengtsson
I have a report consisting of only text. It is columns of data built with PrintTab.
Now I want to draw a line slightly above and under a single line of text.
The problem seems to be that text cursor and graphic cursor is two different things.
How can I get the current graphic position of text so I can use it when drawing the line?
Regards Roland Bengtsson
Loading...