Project: SWT
Bug 138907 Cheese in Tree with text that spans columns
Reported: 2006-04-27 09:52:13 | Status: resolved fixed

Run Snippet240. Resize "Column 1" to be larger. Notice that the text in column 2 is incorrect now. This is different from what happens in Table (see Snippet239). The following works around the problem but has some flash: tree.getColumn(1).addListener(SWT.Resize, new Listener() { public void handleEvent(Event e) { if (tree.getItemCount() > 0) { TreeItem item = tree.getItem(0); Rectangle bounds = item.getBounds(2); Rectangle area = tree.getClientArea(); tree.redraw(bounds.x, area.y, bounds.width, area.height, false); } } });

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