Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Northover2006-08-14 18:13:55 +0000
committerSteve Northover2006-08-14 18:13:55 +0000
commitcbf569832fa41c1410755a264c5900b8bb44c226 (patch)
tree2d5d161ff16bb6f1e98cd35c659afc55354a43a6
parent9f997ce825062b565bfb5afa757235b04e8b95d1 (diff)
downloadeclipse.platform.swt-cbf569832fa41c1410755a264c5900b8bb44c226.tar.gz
eclipse.platform.swt-cbf569832fa41c1410755a264c5900b8bb44c226.tar.xz
eclipse.platform.swt-cbf569832fa41c1410755a264c5900b8bb44c226.zip
151137 - thumb doesn't work for Tree with column [3.2.1]
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index 2f9b89f683..84bc6837cb 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
@@ -4756,6 +4756,19 @@ int windowProc (int hwnd, int msg, int wParam, int lParam) {
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_ALL;
OS.GetScrollInfo (hwndParent, OS.SB_VERT, info);
+ /*
+ * Update the nPos field to match the nTrackPos field
+ * so that the tree scrolls when the scroll bar of the
+ * parent is dragged.
+ *
+ * NOTE: For some reason, this code is only necessary
+ * on Windows Vista.
+ */
+ if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
+ if ((wParam & 0xFFFF) == OS.SB_THUMBTRACK) {
+ info.nPos = info.nTrackPos;
+ }
+ }
OS.SetScrollInfo (handle, OS.SB_VERT, info, true);
int code = OS.SendMessage (handle, OS.WM_VSCROLL, wParam, lParam);
OS.GetScrollInfo (handle, OS.SB_VERT, info);

Back to the top