Community
Participate
Working Groups
Build Identifier: SWT3647 When a Table (or Tree, I believe) has an EraseItem listener, and a TableItem is selected, the selection color doesn't fill the entire horizontal area. Reproducible: Always Steps to Reproduce: snippet: import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.*; public class testTableFullRow { public static void main(String[] args) { Display display = new Display(); Shell shellMain = new Shell(display, SWT.SHELL_TRIM); shellMain.setLayout(new FillLayout(SWT.VERTICAL)); Table table = new Table(shellMain, SWT.BORDER); new TableColumn(table, SWT.RIGHT); new TableItem(table, SWT.NONE).setText("No EraseItem"); table.getColumn(0).setWidth(300); table.select(0); ///////////////////// Table table2 = new Table(shellMain, SWT.BORDER); new TableColumn(table2, SWT.RIGHT); new TableItem(table2, SWT.NONE).setText("Has EraseItem"); table2.getColumn(0).setWidth(300); table2.addListener(SWT.EraseItem, new Listener() { public void handleEvent(Event event) { } }); table2.select(0); //////////////// shellMain.setSize(400, 200); shellMain.open(); while (!shellMain.isDisposed()) { try { if (!display.readAndDispatch()) display.sleep(); } catch (Throwable t) { t.printStackTrace(); } } display.dispose(); } }
Table/Tree.highlightSelectionInClipRect() runs away if EraseItem is hooked.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.