diff options
-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); |