Project: SWT
Bug 176510 SWT (vertical) ScrollBar of Tree on Mac OS X will not fire SWT.Selection on mouse-wheel movements
Reported: 2007-03-06 12:15:49 | Status: resolved fixed

Build ID: I20070222-0951 Steps To Reproduce: 1. Initialize a Tree instance and configure it so that its vertical scroll bar is visible, enabled and actually scrolls through the contents of the Tree (i.e. there should be more TreeItems than fitting the visible/client area of the Tree). 2. Setup listening for SWT.Selection from the ScrollBar returned by Tree#getVerticalBar(). 3. Place the mouse pointer in the area of the ScrollBar specified in step 2 and use the mouse wheel. 4. Notice how the contents of the Tree actually gets scrolled and the thumb of the ScrollBar in question moves but it reports no SWT.Selection event. More information: I think the problem is that the native widget of the Tree (Data Browser?) will scroll its contents in response to the mouse wheel but the SWT ScrollBar that wraps the native handle of the vertical scroll bar of the Tree doesn't account for the change. As far as I understand the code of ScrollBar, it accounts for selection changes on MouseDown. Doesn't ScrollBar have to special-case MouseWheel as well and fire a SWT.Selection event if its selection has changed during the processing of the mouse-wheel movement event?

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java