Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Northover2001-09-10 19:34:18 +0000
committerSteve Northover2001-09-10 19:34:18 +0000
commit7387a87791e42194bbd1d0c59aa0e24483dae3b9 (patch)
tree3b28637a968e00d00cc05ad8854cb68705cdeb54 /bundles
parent5cdfbaba58d2cf343a1caf720e950b0905626f80 (diff)
downloadeclipse.platform.swt-7387a87791e42194bbd1d0c59aa0e24483dae3b9.tar.gz
eclipse.platform.swt-7387a87791e42194bbd1d0c59aa0e24483dae3b9.tar.xz
eclipse.platform.swt-7387a87791e42194bbd1d0c59aa0e24483dae3b9.zip
*** empty log message ***
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java10
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java8
2 files changed, 17 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
index f54e74dbdb..d9e63bcd09 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
@@ -157,6 +157,16 @@ static int checkStyle (int style) {
void createWidget () {
increment = 1;
pageIncrement = 10;
+ /*
+ * Do not set the intial values of the maximum
+ * or the thumb. These values normally default
+ * to 100 and 10 but may have been set already
+ * by the widget that owns the scroll bar. For
+ * example, a scroll bar that is created for a
+ * list widget, setting these defaults would
+ * override the initial values provided by the
+ * list widget.
+ */
}
void destroyWidget () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
index 802e81777f..2823a6f64d 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
@@ -168,11 +168,17 @@ void createWidget () {
super.createWidget ();
increment = 1;
pageIncrement = 10;
+ /*
+ * Set the intial values of the maximum
+ * to 100 and the thumb to 10. Note that
+ * info.nPage needs to be 11 in order to
+ * get a thumb that is 10.
+ */
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
info.fMask = OS.SIF_ALL;
info.nMax = 100;
- info.nPage = pageIncrement + 1;
+ info.nPage = 11;
OS.SetScrollInfo (handle, OS.SB_CTL, info, true);
}

Back to the top