Bug 80357 - Table doesn't handle newline characters in cell's text on MS Windows
Summary: Table doesn't handle newline characters in cell's text on MS Windows
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 98
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Veronika Irvine CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 19496 324404 (view as bug list)
Depends on:
Blocks: 42263 10716 516949
  Show dependency tree
 
Reported: 2004-12-07 05:48 EST by Stanislav Poboril CLA
Modified: 2017-05-19 06:37 EDT (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Poboril CLA 2004-12-07 05:48:21 EST
Try this snippet. With Linux GTK, text is wrapped in the table, with Windows 98
SE this displays | characters instead of wrapping a line. SWT used version: 3111.

import org.eclipse.swt.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;


public class Main {
    public static void main(String[] args) {
        Shell shell = new Shell();
        shell.setLayout(new FillLayout());

        Table table = new Table(shell, SWT.NONE);
        table.setLinesVisible(true);
        table.setHeaderVisible(true);

        TableColumn c = new TableColumn(table, SWT.NONE);
        c.setWidth(200);

        TableItem ti1 = new TableItem(table, SWT.NONE);

        ti1.setText("foo\nfoo");

        TableItem ti2 = new TableItem(table, SWT.NONE);

        ti2.setText("foo\rfoo");

        TableItem ti3 = new TableItem(table, SWT.NONE);

        ti3.setText("foo" + System.getProperty("line.separator") + "foo");

        shell.pack();
        shell.open();

        Display d = shell.getDisplay();

        while (!shell.isDisposed()) {
            if (!d.readAndDispatch()) {
                d.sleep();
            }
        }
    }
}
Comment 1 Steve Northover CLA 2005-01-19 21:17:56 EST
Windows can't be convinced to display wrapped text.  Veronika to disable this 
feature on GTK.
Comment 2 Steve Northover CLA 2005-01-19 21:19:57 EST
*** Bug 19496 has been marked as a duplicate of this bug. ***
Comment 3 Steve Northover CLA 2007-06-14 13:22:39 EDT
We won't fix this.
Comment 4 Mickael Istria CLA 2017-05-19 06:08:04 EDT
Is this still true?(In reply to Steve Northover from comment #1)
> Windows can't be convinced to display wrapped text.

Is this still true?
Comment 5 Mickael Istria CLA 2017-05-19 06:23:27 EDT
*** Bug 324404 has been marked as a duplicate of this bug. ***
Comment 6 Mickael Istria CLA 2017-05-19 06:37:46 EDT
bug 42263 and