diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-11-09 10:10:59 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-11-12 11:04:00 +0200 |
commit | b71650d04ba702bb6c766f6b47c0be294b1c07cb (patch) | |
tree | 8680452e1b8007e63a18aca7c6857f1bf2602919 /src | |
parent | 47f1f9f34d948b37a06b38b6ef383312528520dd (diff) | |
download | fpGUI-b71650d04ba702bb6c766f6b47c0be294b1c07cb.tar.xz |
Position the cursor correctly inside a Edit with text.
Old behaviour was that the beginning of long text was scrolled
off the left of the edit, so you saw the end of the text.
Now we should see the beginning of the text and the end of the
Text is out of view on the right.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/fpg_edit.pas | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/fpg_edit.pas b/src/gui/fpg_edit.pas index dd7958ab..da98224c 100644 --- a/src/gui/fpg_edit.pas +++ b/src/gui/fpg_edit.pas @@ -1038,7 +1038,7 @@ begin FHeightMargin := 2; FMaxLength := 0; // no limit FText := ''; - FCursorPos := UTF8Length(FText); + FCursorPos := 0; FSelStart := FCursorPos; FSelOffset := 0; FTextOffset := 0; @@ -1129,7 +1129,7 @@ begin s := AValue; FText := s; - FCursorPos := UTF8Length(FText); + FCursorPos := 0; FSelStart := FCursorPos; FSelOffset := 0; FTextOffset := 0; |