I am using a treeviewer in my application to perform in-place editing with double click editor activation. On windows 7 when I double click in a cell to activate the in-place editor, the tree node inappropriately expands/collapses.

Is it possible to disable expand/collapse on double click? I don't remember having this problem before moving to windows 7 from XP.

I think this is a bug, but I found a workaround. I found this in the Tree class where double click events get filtered out if the tree has an event listener of type SWT.MeasureItem.

case OS.NM_DBLCLK: {
/*
* When the user double clicks on a tree item
* or a line beside the item, the window proc
* for the tree collapses or expand the branch.
* When application code associates an action
* with double clicking, then the tree expand
* is unexpected and unwanted. The fix is to
* avoid the operation by testing to see whether
* the mouse was inside a tree item.
*/
if (hooks (SWT.MeasureItem)) return LRESULT.ONE;