Project: SWT
Bug 85006 TableColumn.pack() of column 0 wth SWT.CHECK is bad
Reported: 2005-02-11 10:53:08 | Status: resolved fixed

In the following case, column 0 is not packing correctly: public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new RowLayout(SWT.HORIZONTAL)); final Table table = new Table(shell, SWT.BORDER | SWT.CHECK); table.setLayoutData(new RowData(-1, 400)); table.setHeaderVisible(true); TableColumn column0 = new TableColumn(table, SWT.NONE); column0.setText("Column 0"); TableColumn column1 = new TableColumn(table, SWT.NONE); column1.setText("Column 1"); TableColumn column2 = new TableColumn(table, SWT.NONE); column2.setText("Column 2"); TableColumn column3 = new TableColumn(table, SWT.NONE); column3.setText("Column 3"); TableColumn column4 = new TableColumn(table, SWT.NONE); column4.setText("Column 4"); for (int i = 0; i < 20; i++) { TableItem item = new TableItem(table, SWT.NONE); String[] text = new String[]{"abc"+i, "def"+i, "ghi"+i, "jkl"+i, "mnop"+i}; item.setText(text); } column0.pack(); column1.pack(); column2.pack(); column3.pack(); column4.pack(); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java