Project: SWT
Bug 276178 firstColumn in Tables/Trees with no columns should not be resizable by user
Reported: 2009-05-13 15:58:48 | Status: resolved fixed

Tables/Trees must always have 1+ NSTableColumns in order to show any content, even if no swt Table/TreeColumns are created. If the header is visible then the NSColumn is resizable by the user, which should not be doable (similar to if the checkboxes column was resizable by the user). Snippet: public static void main(String[] args) { final Display display = new Display(); Shell shell = new Shell(display); shell.setBounds(10, 10, 200, 200); shell.setLayout(new FillLayout()); Table table = new Table(shell, SWT.NONE); table.setHeaderVisible(true); TableItem item1 = new TableItem(table, SWT.NONE); item1.setText("Item1 Item1 Item1"); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableItem.java bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java