Community
Participate
Working Groups
Using SWT 4.8, if you set the background (or foreground, etc) on table control, then setting background on a single cell, doesn't work anymore. Below a snippet to demostrate the problem: the expected item color should be red instead of yellow (as the control background) With previous 4.7 version, this code works correctly. The problem doesn't affects tree control. public static void main(String[] args) { Display display = Display.getDefault(); Shell s = new Shell(); s.setBounds(0, 0, 600, 400); Table table = new Table(s, SWT.VIRTUAL); new TableColumn(table, SWT.NONE).setWidth(200); table.setHeaderVisible(true); // REMOVE THIS LINE table.setBackground(new Color(display, 255, 255, 0)); table.addListener(SWT.SetData, new Listener() { @Override public void handleEvent(Event event) { TableItem ti = (TableItem) event.item; ti.setText(0, "Hello"); ti.setBackground(0, new Color(display, 255, 0, 0)); } }); table.setItemCount(2); s.setLayout(new FillLayout()); s.layout(); s.open(); for( ;; ) { if( display.isDisposed() || s.isDisposed() ) return; if( !display.readAndDispatch() ) display.sleep(); } }
I'm testing on Windows 7 64 bit version
I can't reproduce on GTK3/2, but can reproduce on Windows 7.
*** Bug 539512 has been marked as a duplicate of this bug. ***
*** Bug 545295 has been marked as a duplicate of this bug. ***
Bug 516365 / https://git.eclipse.org/r/c/100005/ seem to be related
New Gerrit change created: https://git.eclipse.org/r/140945
*** Bug 539056 has been marked as a duplicate of this bug. ***
Gerrit change https://git.eclipse.org/r/140945 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=d90c79a64b1cb6d43c3a9cdcfafd27589651d4f3
Thanks Nikita for the bug fix, resolving now.
.
Verified the fix in latest IBuild: I20190425-1800 Will back-port the fix to 4.11+ shortly today.
New Gerrit change created: https://git.eclipse.org/r/141198
Gerrit change https://git.eclipse.org/r/141198 was merged to [R4_11_maintenance]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=8a8f6a77931f47ec4002010bddaf65625acad9ea
(In reply to Eclipse Genie from comment #13) > Gerrit change https://git.eclipse.org/r/141198 was merged to > [R4_11_maintenance]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=8a8f6a77931f47ec4002010bddaf65625acad9ea Fix back-ported to 4.11+ resolving now.
Reopening for back-port to 4.8+ branch.
New Gerrit change created: https://git.eclipse.org/r/141650
Gerrit change https://git.eclipse.org/r/141650 was merged to [R4_8_maintenance]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=44584a6f685cd5c793aa69e0dba2d4d5643d9a21
(In reply to Eclipse Genie from comment #17) > Gerrit change https://git.eclipse.org/r/141650 was merged to > [R4_8_maintenance]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=44584a6f685cd5c793aa69e0dba2d4d5643d9a21 Fix back-ported to 4.8+ resolving now.
*** Bug 539911 has been marked as a duplicate of this bug. ***
*** Bug 547369 has been marked as a duplicate of this bug. ***
Created attachment 278830 [details] Screenshot of SmartSynchronize with dark theme The change of this ticket introduced us serious problems, so the sort column always is drawn in very light gray.
Note, our tables are owner-drawn (we don't set a color to TableItem directly). Unfortunately, I failed so far to create a tiny snippet to reproduce.
(In reply to Thomas Singer from comment #22) > Note, our tables are owner-drawn (we don't set a color to TableItem > directly). Unfortunately, I failed so far to create a tiny snippet to > reproduce. Please report this in a new bug anyway and link it to this one.
I've found a way to reproduce. Please see bug 547989.