Community
Participate
Working Groups
SWT CVS Win32 Tree.setLinesVisible(true) draws the grid lines in a colour different to that which the Table uses. Tree uses OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER...) Table uses OS.LVS_EX_GRIDLINES, and the OS seems to use the colour of SWT.COLOR_WIDGET_BACKGROUND. To see this in XP, change Display Properties -> Appearance -> Windows and buttons = Windows XP Style Color scheme = Silver (Blue (default), and Olive Green look fine) 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); // tree.setBackground(display.getSystemColor(SWT.COLOR_WHITE)); for (int i = 0; i < columns; i++) new TreeColumn(tree, SWT.LEFT).setWidth(75); tree.setHeaderVisible(true); tree.setLinesVisible(true); tree.setSortDirection(SWT.DOWN); tree.setSortColumn(tree.getColumn(0)); final Table table = new Table(shell, SWT.VIRTUAL | SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION); for (int i = 0; i < columns; i++) new TableColumn(table, SWT.LEFT).setWidth(75); table.setLinesVisible(true); table.setHeaderVisible(true); table.setSortDirection(SWT.DOWN); table.setSortColumn(table.getColumn(0)); shell.setSize(800, 600); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
Created attachment 67435 [details] Patch It is visually unappealing to have Tables and Trees visible at the same time but have the grid lines be different colours. Attached is quick patch that uses OS.Polyline with a pen in OS.COLOR_3DFACE rather than using OS.Drawedge to draw the Tree grid lines.
Ping for 3.4?
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.