diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2010-06-11 23:48:47 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2010-06-11 23:48:47 +0200 |
commit | 2364f2115ffccd71464da8fc2e68b7074bb262f2 (patch) | |
tree | bee2be606f98666105eb6758d998081f5bc36cc8 | |
parent | 6d6d9a68f5bb8913b6e430e6c32e7781daf0ae4a (diff) | |
download | fpGUI-2364f2115ffccd71464da8fc2e68b7074bb262f2.tar.xz |
TextEdit: Ctrl + Up/Down Arrows now keeps the scrollbar in sync too.
-rw-r--r-- | prototypes/textedit/fpg_textedit.pas | 8 |
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 |