always calculate range, not only when visible (fixes bug #650)

git-svn-id: trunk@7047 -
This commit is contained in:
micha 2005-04-01 08:25:25 +00:00
parent ad04037248
commit 8f4536230c

View File

@ -253,22 +253,18 @@ begin
ScrollInfo.nPage := FPage; ScrollInfo.nPage := FPage;
// range // range
if Visible then begin OtherScrollbar:=GetOtherScrollBar;
OtherScrollbar:=GetOtherScrollBar; If OtherScrollbar.FVisible then
If OtherScrollbar.FVisible then SBSize := OtherScrollbar.Size
SBSize := OtherScrollbar.Size
else
SBSize := 0;
if Kind=sbVertical then
FAutoRange := (FRange - ClientHeight)
*Shortint(FRange >= ClientHeight + SBSize)
else
FAutoRange := (FRange - ClientWidth)
*Shortint(FRange >= ClientWidth + SBSize);
ScrollInfo.nMax := FRange;
end
else else
ScrollInfo.nMax := 0; SBSize := 0;
if Kind=sbVertical then
FAutoRange := (FRange - ClientHeight)
*Shortint(FRange >= ClientHeight + SBSize)
else
FAutoRange := (FRange - ClientWidth)
*Shortint(FRange >= ClientWidth + SBSize);
ScrollInfo.nMax := FRange;
// visible // visible
if Kind=sbVertical then if Kind=sbVertical then