summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2013-03-17 00:18:14 +0000
committerDavid Laurence Emerson <dle3ab@angelbase.com>2013-05-28 00:42:48 -0700
commitcc984e5b160ab3b6ecc0cfadb3ddc3827a768929 (patch)
tree57260ced17982096650d95fd779349ae53cb3435
parentdc1859b7e87a08c76d8aaac872f148c1090c7d37 (diff)
downloadfpGUI-cc984e5b160ab3b6ecc0cfadb3ddc3827a768929.tar.xz
textedit: access to caret pos H.
-rw-r--r--examples/apps/ide/src/fpg_textedit.pas13
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);