Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When the text from the NoteText property is displayed in a memo control, the text seems to format inappropriately. How is text formatted?

0
Posted

When the text from the NoteText property is displayed in a memo control, the text seems to format inappropriately. How is text formatted?

0

The text is placed into a TStringList so each line cannot be larger than 255 characters (due to Delphi 1.0 limitation). The text is therefore formatted so that CRLF breaks a line. If there are no CRLF breaks within a 255 character segment, then the line is broken at the last space. If there isn’t a space, then the line is arbitrarily broken at 255 characters. Depending on the width of your memo control this may be a good or bad number (255 characters). If you need additional control, the following code will give you an example of one way to proceed. Remember that the Msg^.NoteText points to the null terminated string after the ReadMail and before the FreeMsgMem call.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123