diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-03-17 12:18:16 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-03-17 12:18:16 +0000 |
commit | e3ed1e992eda0b4cdff876d7762803932f30aa1b (patch) | |
tree | 470a05c23d2d1d4a1f6020e33ae064186d60178e /examples/apps | |
parent | 02ff580a564d9cf3356bbfa91d4b2a15af43aae1 (diff) | |
download | fpGUI-e3ed1e992eda0b4cdff876d7762803932f30aa1b.tar.xz |
textedit: Adds access to the Caret Vertical position.
Diffstat (limited to 'examples/apps')
-rw-r--r-- | examples/apps/ide/src/fpg_textedit.pas | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/apps/ide/src/fpg_textedit.pas b/examples/apps/ide/src/fpg_textedit.pas index aa5354a6..c69ca907 100644 --- a/examples/apps/ide/src/fpg_textedit.pas +++ b/examples/apps/ide/src/fpg_textedit.pas @@ -125,11 +125,13 @@ type function GetHScrollPos: Integer; function GetVScrollPos: Integer; function GetCaretPosH: Integer; + function GetCaretPosV: Integer; procedure SetFontDesc(const AValue: string); procedure SetGutterShowLineNumbers(const AValue: Boolean); procedure SetGutterVisible(const AValue: Boolean); procedure SetHScrollPos(const AValue: Integer); procedure SetCaretPosH(const AValue: Integer); + procedure SetCaretPosV(const AValue: Integer); procedure SetLines(const AValue: TStrings); procedure SetScrollBarStyle(const AValue: TfpgScrollStyle); procedure SetTabWidth(const AValue: Integer); @@ -199,6 +201,7 @@ type procedure LoadFromFile(const AFileName: TfpgString); procedure FindText(TextToFind: TfpgString; FindOptions: TfpgFindOptions; Backward: Boolean = False); property CaretPos_H: Integer read GetCaretPosH write SetCaretPosH; + property CaretPos_V: Integer read GetCaretPosV write SetCaretPosV; property FontHeight: Integer read FChrH; property FontWidth: Integer read FChrW; property ScrollPos_H: Integer read GetHScrollPos write SetHScrollPos; @@ -426,6 +429,11 @@ begin Result := CaretPos.Y; end; +function TfpgBaseTextEdit.GetCaretPosV: Integer; +begin + Result := CaretPos.X; +end; + procedure TfpgBaseTextEdit.SetFontDesc(const AValue: string); begin FFont.Free; @@ -468,6 +476,11 @@ begin CaretPos.Y := AValue; end; +procedure TfpgBaseTextEdit.SetCaretPosV(const AValue: integer); +begin + CaretPos.X := AValue; +end; + procedure TfpgBaseTextEdit.SetVScrollPos(const AValue: Integer); begin SetVPos(AValue); |