Community
Participate
Working Groups
I20101005-0800 On Windows 7, the Tree widget should not show the hand pointer by default when the user moves the mouse over an item. The tree in the Windows Explorer does that because clicking a folder executes an action (feeds the right pane). But that's not the case in general. E.g. compmgmt.msc behaves like WinXP, Linux, and the Mac (shows the normal arrow cursor). In some popups (Breadcrumb, Ctrl+O, Ctrl+E, Ctrl+3, etc.), we have special code that turns the cursor into a hand if the item under the mouse will be opened on single-click (bug 277862). In the breadcrumb, we compute the cursor individually per item (e.g. a folder does not get the hand pointer), but this information is lost on Windows 7.
It is the OS doing it, not us. Does it work as expected if you always set the cursor ? tree = new Tree(parent, style); tree.setCursor(display.getSystemCursor(SWT.CURSOR_ARROW)); I rather not override the OS behaviour.
> Does it work as expected if you always set the cursor ? Yes, that would work. But I still think the hand pointers are wrong in almost all trees. Microsoft's guidelines are also quite clear on that topic: http://msdn.microsoft.com/en-us/library/bb545459.aspx#hand E.g. in the Package Explorer, the cursor is a hand on item names (where a single click doesn't do anything, but it's an arrow on the twisties (where a click actually toggles expansion).
Silenio, please advise. Should I go ahead and make the change ? Please bear in mind that once the change is in users that want the behaviour will not be able to get it; the control only shows the hand when the mouse is over an item, thus tree.setCursor(display.getSystemCursor(SWT.CURSOR_HANDE)); will not restore the same behavour. Personally I agree this is a odd behaviour and I am okay disabling it.
(In reply to comment #3) If somebody really cries for the current behavior, you could always add a CURSOR_HAND_ON_ITEM constant later.
Go ahead and make the change. The user can always add a mouse listener and change the cursor to SWT.CURSOR_HAND when the mouse is over an item.
Created attachment 182634 [details] Patch
Fixed in HEAD
Thanks! I only work on Windows 7 during the test pass and this change makes the user experience much better.