Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2006-07-27 22:14:19 +0000
committerFelipe Heidrich2006-07-27 22:14:19 +0000
commitc6a55e682932cf2d9c5de5959d835ce856901679 (patch)
tree69da375f724668a1ee47035bc4f3116f2fc81929 /bundles
parenta84b31d5b33dc25b49cb488d9000ba1334601a03 (diff)
downloadeclipse.platform.swt-c6a55e682932cf2d9c5de5959d835ce856901679.tar.gz
eclipse.platform.swt-c6a55e682932cf2d9c5de5959d835ce856901679.tar.xz
eclipse.platform.swt-c6a55e682932cf2d9c5de5959d835ce856901679.zip
151137 - thumb doesn't work for tree with column
Diffstat (limited to 'bundles')
-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 e7f3609845..9b79a25f5e 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