Community
Participate
Working Groups
The tree viewer doesn't have a dotted box around the current tree item. This makes keyboard navigation hard as it is difficult to see what would get expanded or selected with the space bar. It is also hard to see that a tree has focus as when the tree is created no row is selected either. This seems to be a Windows problem - without SWT.FULL_SELECTION the focus text is indicated with a box, but then only the first column text makes the row selectable.
Created attachment 196549 [details] Tree without focus The first row should have a dotted box around it to show it has focus.
Created attachment 196550 [details] Expected focus box The expected focus box would be like this grey box, but much thinner, dotted and in the foreground colour (black).
I have a fix - by adding a gc.drawFocus in a paint listener on the tree.
This fix works for Windows XP, but I have a report that it doesn't make a difference for Windows 7. It is still worth doing for Windows XP.
Fixed on Windows XP
A fix for Windows 7 is to also draw the box on SWT.EraseItem
Fix applied for Windows 7 - also applied unrelated fix to TreeAdapter.indexOf.