Bug in previewing memo fields?
Hello,
Using RB9.02 with Delphi 7.
I have been getting errors in RB when trying to preview one of my reports.
Error is a list index out of bounds on a TStringList. I tracked i down to
the fact that when printing a memo component that has no lines (procedure
TppScreenDevice.DrawStandardText), RB somehow determines that the lines
don't fit into the control and so set the line count to a denominator of the
line height and the size of the memo.
Changing the line:
lbLinesFit := liLineHeight <= Trunc((lDrawRect.Bottom -
lDrawRect.Top) / aDrawText.WrappedText.Count);
to
lbLinesFit := (aDrawText.WrappedText.Count = 0) or (liLineHeight
<= Trunc((lDrawRect.Bottom - lDrawRect.Top) / aDrawText.WrappedText.Count));
seems to fix the probelm. Is this a valid change?
Regards,
Gilbert
Using RB9.02 with Delphi 7.
I have been getting errors in RB when trying to preview one of my reports.
Error is a list index out of bounds on a TStringList. I tracked i down to
the fact that when printing a memo component that has no lines (procedure
TppScreenDevice.DrawStandardText), RB somehow determines that the lines
don't fit into the control and so set the line count to a denominator of the
line height and the size of the memo.
Changing the line:
lbLinesFit := liLineHeight <= Trunc((lDrawRect.Bottom -
lDrawRect.Top) / aDrawText.WrappedText.Count);
to
lbLinesFit := (aDrawText.WrappedText.Count = 0) or (liLineHeight
<= Trunc((lDrawRect.Bottom - lDrawRect.Top) / aDrawText.WrappedText.Count));
seems to fix the probelm. Is this a valid change?
Regards,
Gilbert
This discussion has been closed.
Comments
There is currently a patch available for this issue (similar to the fix you
made). If you would like the patch, please send a small email requesting it
to support@digital-metaphors.com and we'll send it to you asap.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks, but i think i will wait 'till v9.03 as the problem seems to be
sorted on this side.
Gilbert