Community
Participate
Working Groups
Eclipse 3.0 M3 In the Paint event or in a GC you created on a table with headers, (0, 0) is not at the top left but is under the headers. This is not consistant with other platforms. Run the following example and note that the red square is not drawn under the cursor: public static void main(String[] args) { Display display = new Display(); final Color red = display.getSystemColor(SWT.COLOR_RED); Shell shell = new Shell(display); shell.setLayout(new GridLayout()); final Table table = new Table(shell, SWT.BORDER); table.setLayoutData(new GridData(GridData.FILL_BOTH)); TableColumn column1 = new TableColumn(table, SWT.NONE); TableColumn column2 = new TableColumn(table, SWT.NONE); TableColumn column3 = new TableColumn(table, SWT.NONE); for (int i = 0; i < 10; i++) { TableItem item = new TableItem(table, SWT.NONE); item.setText(new String[] {"asdadas", "asdadasd", "rrwrwrw"}); } column1.pack(); column2.pack(); column3.pack(); table.addMouseListener(new MouseAdapter() { public void mouseDown(MouseEvent e) { System.out.println("mouse down at "+e.x+" "+e.y); GC gc = new GC(table); gc.setForeground(red); gc.drawRectangle(e.x, e.y, 2, 2); gc.dispose(); } }); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
*** Bug 42431 has been marked as a duplicate of this bug. ***
*** Bug 75284 has been marked as a duplicate of this bug. ***
*** Bug 57377 has been marked as a duplicate of this bug. ***
*** Bug 81102 has been marked as a duplicate of this bug. ***
Also affects Solaris-GTK
This appears to be fixed > 3224 && <= 3226. I'll leave it open since I'm not a dev and you may want to find out who fixed it (or at least confirm)
No reply in several years, comment 6 indicates the issue has been fixed.