summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-02-21 02:07:50 (GMT)
committerhobbs <hobbs>2003-02-21 02:07:50 (GMT)
commitbe541dbd983a3d33cc41473c8ea42d515369410f (patch)
tree387ec363d63f92ef19d46605fb09266ec870bf6f
parent2cb74285f2d3594505c682851f59449520957937 (diff)
downloadtk-be541dbd983a3d33cc41473c8ea42d515369410f.zip
tk-be541dbd983a3d33cc41473c8ea42d515369410f.tar.gz
tk-be541dbd983a3d33cc41473c8ea42d515369410f.tar.bz2
* win/tkWinScrlbr.c (UpdateScrollbar): use SIF_DISABLENOSCROLL to
"disable" scrollbar when on Windows when there is nothing to scroll. This is Windows style, and fixes [Bug #624116].
-rw-r--r--ChangeLog10
-rw-r--r--win/tkWinScrlbr.c8
2 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 60e9b48..7dde307 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2003-02-20 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * win/tkWinScrlbr.c (UpdateScrollbar): use SIF_DISABLENOSCROLL to
+ "disable" scrollbar when on Windows when there is nothing to
+ scroll. This is Windows style, and fixes [Bug #624116].
+
+ * tests/panedwindow.test:
+ * generic/tkPanedWindow.c (ValidSashIndex): corrected to note that
+ 2 panes must exist before any one sash does. [tcllib Bug #689258]
+
2003-02-20 Peter Spjuth <peter.spjuth@space.se>
* tests/panedwindow.test:
diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c
index 1eb3b47..359fc46 100644
--- a/win/tkWinScrlbr.c
+++ b/win/tkWinScrlbr.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinScrlbr.c,v 1.8 2002/06/14 22:25:12 jenglish Exp $
+ * RCS: @(#) $Id: tkWinScrlbr.c,v 1.9 2003/02/21 02:07:50 hobbs Exp $
*/
#include "tkWinInt.h"
@@ -185,6 +185,12 @@ UpdateScrollbar(scrollPtr)
* (MAX_SCROLL - (scrollInfo.nPage - 1)));
} else {
scrollInfo.nPos = 0;
+ /*
+ * Disable the scrollbar when there is nothing to scroll.
+ * This is standard Windows style (see eg Notepad).
+ * Also prevents possible crash on XP+ systems [Bug #624116].
+ */
+ scrollInfo.fMask |= SIF_DISABLENOSCROLL;
}
SetScrollInfo(scrollPtr->hwnd, SB_CTL, &scrollInfo, TRUE);
}