summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-11 11:16:07 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-11 11:16:07 +0200
commit31dc8b6a853e7334be9431496f94d290d7173e5d (patch)
tree14bb0e957c879bc12540697ed45f2d31ec6ebd1b
parentea16d11aa2d48d574b6f766ae3cc2e9070796cec (diff)
downloadfpGUI-31dc8b6a853e7334be9431496f94d290d7173e5d.tar.xz
richview: fixes the painting bug of bottom/right corner rectangle
Refactored the code, so we only use UpdateScrollBarCoords() method.
-rw-r--r--docview/components/richtext/RichTextView.pas16
1 files changed, 2 insertions, 14 deletions
diff --git a/docview/components/richtext/RichTextView.pas b/docview/components/richtext/RichTextView.pas
index 5db8cbdf..fae04180 100644
--- a/docview/components/richtext/RichTextView.pas
+++ b/docview/components/richtext/RichTextView.pas
@@ -1279,24 +1279,10 @@ begin
// Physical horizontal scroll setup
FHScrollbar.Visible := FNeedHScroll;
FHScrollbar.Enabled := FNeedHScroll;
- FHScrollbar.Left := 2;
- FHScrollbar.Top := Height - 2 - FScrollBarWidth;
- FHScrollbar.Height := FScrollbarWidth;
- if FNeedVScroll then
- FHScrollbar.Width := Width - 4 - FScrollBarWidth
- else
- FHScrollbar.Width := Width - 4;
// Physical vertical scroll setup
FVScrollbar.Visible := FNeedVScroll;
FVScrollbar.Enabled := FNeedVScroll;
- FVScrollbar.Left := Width - 2 - FScrollbarWidth;
- FVScrollbar.Top := 2;
- FVScrollbar.Width := FScrollbarWidth;
- if FNeedHScroll then
- FVScrollbar.Height := Height - 4 - FScrollbarWidth
- else
- FVScrollbar.Height := Height - 4;
// Initialise scroll
FYScroll := FVScrollBar.Position;
@@ -1306,6 +1292,8 @@ begin
FVScrollbar.OnScroll := @FVScrollbarScroll;
FHScrollbar.OnScroll := @FHScrollbarScroll;
+
+ UpdateScrollBarCoords;
End;
Procedure TRichTextView.SetupCursor;