diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-03-26 10:59:21 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-03-26 10:59:21 +0200 |
commit | a853895e337175b010c1e1cc5fbc39ba81741e26 (patch) | |
tree | bcd827d6b82a71d13e4adb70cf133e67f675ca45 /src | |
parent | c0638111c5ef4ce8aae94c183a257ac2212ec7cd (diff) | |
download | fpGUI-a853895e337175b010c1e1cc5fbc39ba81741e26.tar.xz |
Fix HandleKeyPress handling. When ReadOnly, then keyTab and keyMenu did not work.
Now even though the Edit component is read only, you can select text with
the keyboard, tab in/out and activate the popup menu with the Menu key.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/fpg_edit.pas | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/fpg_edit.pas b/src/gui/fpg_edit.pas index f82bbf1f..23d33d88 100644 --- a/src/gui/fpg_edit.pas +++ b/src/gui/fpg_edit.pas @@ -843,8 +843,6 @@ begin if not Consumed then begin - consumed := True; - if not ReadOnly then begin case keycode of @@ -858,9 +856,9 @@ begin Dec(FCursorPos); hasChanged := True; end;// backspace + Consumed := True; end; - keyDelete: begin if FSelOffset <> 0 then @@ -868,10 +866,9 @@ begin else if FCursorPos < UTF8Length(FText) then UTF8Delete(FText, FCursorPos + 1, 1); hasChanged := True; + Consumed := True; end; - else - Consumed := False; - end; + end; { case } end; if Consumed then |