Community
Participate
Working Groups
Snippet to reproduce: Link link = new Link( parent, SWT.WRAP ); link.setText( "first line\nsecond line" ); In SWT, the linebreak is preserved, in RAP it's not.
Ralf, neither SWT.WRAP javadoc nor Link javadoc state that Link widget supports SWT.WRAP style flag.... at least on Windows. Forms Hyperlink widget is the one that supports SWT.WRAP style flag.
(In reply to comment #1) > Ralf, neither SWT.WRAP javadoc nor Link javadoc state that Link widget supports > SWT.WRAP style flag.... at least on Windows. Forms Hyperlink widget is the one > that supports SWT.WRAP style flag. Right, I missed this. That means in contrast to a Label, a Link *always* wraps. Anyway, the SWT Link respects newlines, so the RWT Link should do so as well.
Fixed in CVS HEAD by replacing new lines with <br/> in LinkAdapter.js.