summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2010-06-11 23:48:47 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2010-06-11 23:48:47 +0200
commit2364f2115ffccd71464da8fc2e68b7074bb262f2 (patch)
treebee2be606f98666105eb6758d998081f5bc36cc8
parent6d6d9a68f5bb8913b6e430e6c32e7781daf0ae4a (diff)
downloadfpGUI-2364f2115ffccd71464da8fc2e68b7074bb262f2.tar.xz
TextEdit: Ctrl + Up/Down Arrows now keeps the scrollbar in sync too.
-rw-r--r--prototypes/textedit/fpg_textedit.pas8
1 files changed, 4 insertions, 4 deletions
diff --git a/prototypes/textedit/fpg_textedit.pas b/prototypes/textedit/fpg_textedit.pas
index ee1a8cc1..4cbaa996 100644
--- a/prototypes/textedit/fpg_textedit.pas
+++ b/prototypes/textedit/fpg_textedit.pas
@@ -818,8 +818,8 @@ begin
else if (ssCtrl in ShiftState) and not (ssShift in ShiftState) then
begin
CaretPos.Y := CaretPos.Y - 1;
- {$Note This does not work. The view must scroll and caret pos stay the same. }
- VScrollBarMove(self, FVScrollBar.Position-1);
+ if FVScrollBar.Visible then
+ FVScrollBar.LineUp; // VScrollBarMove(self, FVScrollBar.Position-1);
FSelStartNo := CaretPos.Y;
Exit;
end
@@ -861,8 +861,8 @@ begin
else if (ssCtrl in ShiftState) and not (ssShift in ShiftState) then
begin
CaretPos.Y := CaretPos.Y + 1;
- {$Note This does not work. The view must scroll and caret pos stay the same. }
- VScrollBarMove(self, FVScrollBar.Position+1);
+ if FVScrollBar.Visible then
+ FVScrollBar.LineDown; // VScrollBarMove(self, FVScrollBar.Position+1);
FSelStartNo := CaretPos.Y;
Exit;
end