Project: SWT
Bug 131805 Tree: Sorted background column colour does not move with movable columns
Reported: 2006-03-14 15:37:33 | Status: resolved fixed

SWT Win32 CVS Drag a Tree column header to a different location. The sorted background colour does not move with the column. public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new FillLayout()); final int columns = 5; final Tree tree = new Tree(shell, SWT.BORDER | SWT.VIRTUAL | SWT.FULL_SELECTION | SWT.MULTI); for (int i = 0; i < columns; i++) { TreeColumn tc = new TreeColumn(tree, SWT.LEFT); tc.setWidth(75); tc.setMoveable(true); } tree.setHeaderVisible(true); tree.setLinesVisible(true); tree.setSortDirection(SWT.DOWN); tree.setSortColumn(tree.getColumn(0)); tree.setItemCount(10); tree.addListener(SWT.SetData, new Listener() { public void handleEvent(Event event) { TreeItem item = (TreeItem) event.item; String text = String.valueOf(event.index); for (int i = 0; i <= columns; i++) { item.setText(i, text); } } }); shell.setSize(800, 600); 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/Tree.java