I am trying to use Delphi (Delphi 2009) TMemo and TcxMemo components - I have WordWrap=True and Scrollbars=[vertical scrollbar] and I am adding 4 very long text lines. The memo component automatically wraps those lines into several more lines and creates vertical scrollbar.

Then I resize the memo component, e.g. because the form is being made bigger. The bad thing is that the wrapping of the lines is preserved, the memo component does not recalculate the wrapping and that is why the big white space is added to the right hand side of the text.

I expect that memo components should re-wrap the text, it is to intuitive. But it does not happen? Is this the bug? Is there some property?

This problem is only when the text is added in the design time. The design time designer wraps and saves text at the fixed positions and apparently saves in dfm the text with additional LineBreaks that were no in the original text. So - this is some kind of bug.

1

There are 1 answers

1
TomR On BEST ANSWER

I found the answer in https://supportcenter.devexpress.com/ticket/details/q533519/problem-assigning-tcxmemo-lines-to-another-component-with-wordwrap

...disable the WordWrap property at design time and enable it on form showing