Removing Extra CRs from a TppDBMemo Before Printing
My users have a bad habit of pressing carriage return in memo fields instead
of letting them word wrap.
Is there a way to remove all of the carriage returns from a TppDBMemo before
printing? What I would like is to simply word wrap on new lines with a
couple of inserted spaces.
Alternately, how can I make the TppDBMemo component autosize to hold the
multiple lines of text? I tried .Stretch=TRUE, but that when the memo has 3
lines it overwrites the next line, a TppLabel.
Thanks,
-Johnnie
of letting them word wrap.
Is there a way to remove all of the carriage returns from a TppDBMemo before
printing? What I would like is to simply word wrap on new lines with a
couple of inserted spaces.
Alternately, how can I make the TppDBMemo component autosize to hold the
multiple lines of text? I tried .Stretch=TRUE, but that when the memo has 3
lines it overwrites the next line, a TppLabel.
Thanks,
-Johnnie
This discussion has been closed.
Comments
A TppDBMemo component is separated into separate strings (based on a carrage
return or the point a word wrap occured) and placed into a TStringList
before being written to a report. It would be possible to perhaps to take
the TppDBMemo.Lines object, put all the strings in the list into one
temporary single string, then separate them out again according to the size
of the memo control into another TStringList.
For your alternative, you should simply be able to set the
TppLabel.ShiftWithParent property to true and the label will move with the
band. If this does not give you the results you desire, try placing the
label inside a TppRegion with the region set to ShiftRelativeTo your DBMemo.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com