summaryrefslogtreecommitdiff
path: root/src/reportengine/u_visu.pas
diff options
context:
space:
mode:
Diffstat (limited to 'src/reportengine/u_visu.pas')
-rw-r--r--src/reportengine/u_visu.pas6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/reportengine/u_visu.pas b/src/reportengine/u_visu.pas
index 57f1ee74..cadcf51c 100644
--- a/src/reportengine/u_visu.pas
+++ b/src/reportengine/u_visu.pas
@@ -585,7 +585,11 @@ var
h: integer;
begin
h := Bv_Visu.Height + (PreviewMargin*2);
- VScrollBar.Max := Abs(h - VScrollBar.Height);
+ { if page is smaller than screen space, scrolling gets disabled }
+ if h > VScrollBar.Height then
+ VScrollBar.Max := Abs(h - VScrollBar.Height)
+ else
+ VScrollBar.Max := 0;
VScrollBar.SliderSize := VScrollBar.Height / h;
VScrollBar.Position := 0;
end;