summaryrefslogtreecommitdiff
path: root/src/reportengine/u_visu.pas
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-08-28 15:12:17 +0100
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-08-28 15:12:17 +0100
commitfffcc6f52bf280f7f48d16ea05f991e5389ce816 (patch)
tree9e8bab780e026b116d1b0eac74b3bca5c0cf2d2a /src/reportengine/u_visu.pas
parent9925f47e49acf933feb01b90701176a6c0570b9e (diff)
downloadfpGUI-fffcc6f52bf280f7f48d16ea05f991e5389ce816.tar.xz
pdf: fixes scroll bar calculations.
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;