diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-03-17 00:18:14 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-03-17 00:18:14 +0000 |
commit | 02ff580a564d9cf3356bbfa91d4b2a15af43aae1 (patch) | |
tree | e3256a06d668726d70507b84b90be1261d36fd3d /examples/apps/ide | |
parent | af52877ff7530061eaa9657ccf5544e4e4425e04 (diff) | |
download | fpGUI-02ff580a564d9cf3356bbfa91d4b2a15af43aae1.tar.xz |
textedit: access to caret pos H.
Diffstat (limited to 'examples/apps/ide')
-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 7c8ef151..aa5354a6 100644 --- a/examples/apps/ide/src/fpg_textedit.pas +++ b/examples/apps/ide/src/fpg_textedit.pas @@ -124,10 +124,12 @@ type function GetGutterVisible: Boolean; function GetHScrollPos: Integer; function GetVScrollPos: Integer; + function GetCaretPosH: 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 SetLines(const AValue: TStrings); procedure SetScrollBarStyle(const AValue: TfpgScrollStyle); procedure SetTabWidth(const AValue: Integer); @@ -196,6 +198,7 @@ type procedure SaveToFile(const AFileName: TfpgString); procedure LoadFromFile(const AFileName: TfpgString); procedure FindText(TextToFind: TfpgString; FindOptions: TfpgFindOptions; Backward: Boolean = False); + property CaretPos_H: Integer read GetCaretPosH write SetCaretPosH; property FontHeight: Integer read FChrH; property FontWidth: Integer read FChrW; property ScrollPos_H: Integer read GetHScrollPos write SetHScrollPos; @@ -418,6 +421,11 @@ begin Result := VPos; end; +function TfpgBaseTextEdit.GetCaretPosH: Integer; +begin + Result := CaretPos.Y; +end; + procedure TfpgBaseTextEdit.SetFontDesc(const AValue: string); begin FFont.Free; @@ -455,6 +463,11 @@ begin FTabWidth := AValue; end; +procedure TfpgBaseTextEdit.SetCaretPosH(const AValue: integer); +begin + CaretPos.Y := AValue; +end; + procedure TfpgBaseTextEdit.SetVScrollPos(const AValue: Integer); begin SetVPos(AValue); |