Posted: Thu Jan 05, 2012 2:57 pm
Yes, after assigning Cell.BestWidth, widths of columns are not changed, and the problem is in line wrapping algorithm. It ignores space characters only when they are in the middle of text. But a space character at the end of a paragraph is counted as a non-space character; so, as you can see, when the last word+space cannot be placed on the line, it is moved to the next line.
Changing this behavior will lead to more serious problems, so I do not plan to do it.
I can suggest to remove this space at all.
Add this code before RVE.DeleteSelection:
Changing this behavior will lead to more serious problems, so I do not plan to do it.
I can suggest to remove this space at all.
Add this code before RVE.DeleteSelection:
Code: Select all
if (RVData1.GetItemStyle(FirstItemNo)>=0) and (Offs>1) and
(RVData1.GetItemText(FirstItemNo)[Offs-1]=' ') then
RVData1.SetSelectionBounds(FirstItemNo, Offs-1,
RVData1.ItemCount-1, RVData1.GetOffsAfterItem(RVData1.ItemCount-1));