summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Levecque <jean-marc.levecque@jmlesite.fr>2013-03-02 23:17:12 +0100
committerDavid Laurence Emerson <dle3ab@angelbase.com>2013-05-28 00:42:49 -0700
commitdff1483cdade46db13e5645bb849abef017a8013 (patch)
tree273cb2b5ce5b5e6aad98cf0451c8fdfecea44184
parentcc2630b5035fc2d47e30318dfbd61cb91a239b94 (diff)
downloadfpGUI-dff1483cdade46db13e5645bb849abef017a8013.tar.xz
Make special characters known by editcombobox
-rw-r--r--src/gui/fpg_editcombo.pas37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/gui/fpg_editcombo.pas b/src/gui/fpg_editcombo.pas
index 3887cd13..311d452f 100644
--- a/src/gui/fpg_editcombo.pas
+++ b/src/gui/fpg_editcombo.pas
@@ -87,6 +87,7 @@ type
FSelStart: integer;
FSelOffset: integer;
FCursorPos: integer;
+ FSpecialChar: integer;
procedure DoDropDown; override;
function GetText: string; virtual;
function HasText: boolean; virtual;
@@ -523,6 +524,38 @@ var
i: integer;
begin
prevval := FText;
+ if FSpecialChar> -1 then
+ begin
+ case FSpecialChar of
+ 58536:
+ case AText of
+ 'a':
+ AText:= 'â';
+ 'e':
+ AText:= 'ë';
+ 'i':
+ AText:= 'ï';
+ 'o':
+ AText:= 'ö';
+ 'u':
+ AText:= 'ü';
+ end;
+ 58462:
+ case AText of
+ 'a':
+ AText:= 'â';
+ 'e':
+ AText:= 'ê';
+ 'i':
+ AText:= 'î';
+ 'o':
+ AText:= 'ô';
+ 'u':
+ AText:= 'û';
+ end;
+ end;
+ FSpecialChar:= -1;
+ end;
s := AText;
consumed := False;
if FText = '' then
@@ -584,6 +617,9 @@ var
begin
hasChanged := False;
+ if (keycode= 58536) or (keycode= 58462) then
+ FSpecialChar:= keycode;
+
if not Enabled then
consumed := False
else
@@ -883,6 +919,7 @@ begin
FDrawOffset := 0;
FSelectedItem := -1; // to allow typing if list is empty
FNewItem := False;
+ FSpecialChar := -1;
CalculateInternalButtonRect;
end;