Project: SWT
Bug 96635 Repaint problem with Table, Image and SWT_HIDE_SELECTION
Reported: 2005-05-25 12:08:15 | Status: resolved fixed

Having a Table with the Hint SWT.HIDE_SELECTION and an Image inside the TableItem, makes some problems. When the Table has lost Focus, the Row hides the Selection for the Text, but the Image is still painted in the Selection Color. Reproduce with this Snippet: public class Main { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); Image image = new Image(display, 16, 16); Table table1 = new Table(shell, SWT.BORDER | SWT.HIDE_SELECTION); TableItem item1 = new TableItem(table1, SWT.NONE); item1.setText("Hello World"); item1.setImage(image); Table table2 = new Table(shell, SWT.BORDER | SWT.HIDE_SELECTION); TableItem item2 = new TableItem(table2, SWT.NONE); item2.setText("Hello World"); item2.setImage(image); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } } 1.) Click into Left Table 2.) Click into Right Table Ben

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