krgr
unread,Nov 6, 2010, 7:10:41 AM11/6/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SWT PaperClips
Hi,
When I declare something like that:
TextPrint text = new TextPrint("text\r\n\r\n\r\n");
there will be just "text" printed out withouth trailing empty lines. I
don't know if it is a feature or bug, but I have multiline controls
when user may enter text and he adds empty lines, which are not
visible on the printout.
I think that is because in TextIterator constructor there is a line:
this.lines = print.getText().split("(\r)?\n");
which splits the text, but ending line breaks are ignored. To preserve
ending line breaks, the above code should be changed to something like
that:
this.lines = print.getText().split("(\r)?\n", -2);
Am I correct, or missing something ?