diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-08-28 15:12:17 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-08-28 15:12:17 +0100 |
commit | fffcc6f52bf280f7f48d16ea05f991e5389ce816 (patch) | |
tree | 9e8bab780e026b116d1b0eac74b3bca5c0cf2d2a /src/reportengine/u_visu.pas | |
parent | 9925f47e49acf933feb01b90701176a6c0570b9e (diff) | |
download | fpGUI-fffcc6f52bf280f7f48d16ea05f991e5389ce816.tar.xz |
pdf: fixes scroll bar calculations.
Diffstat (limited to 'src/reportengine/u_visu.pas')
-rw-r--r-- | src/reportengine/u_visu.pas | 6 |
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; |