mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 06:08:17 +02:00
LCL: fix grids UTF8Keypress, issue #38666
This commit is contained in:
parent
9f7df59b14
commit
3ae2076292
@ -1314,6 +1314,7 @@ type
|
||||
function EditorByStyle(Style: TColumnButtonStyle): TWinControl; virtual;
|
||||
procedure EditorKeyDown(Sender: TObject; var Key:Word; Shift:TShiftState);
|
||||
procedure EditorKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure EditorUTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char);
|
||||
procedure EditorKeyUp(Sender: TObject; var key:Word; shift:TShiftState);
|
||||
procedure EditorTextChanged(const aCol,aRow: Integer; const aText:string); virtual;
|
||||
|
||||
@ -5698,6 +5699,7 @@ begin
|
||||
end;
|
||||
if FEditorOptions and EO_HOOKKEYPRESS = EO_HOOKKEYPRESS then begin
|
||||
FEditor.OnKeyPress := @EditorKeyPress;
|
||||
FEditor.OnUTF8KeyPress := @EditorUTF8KeyPress;
|
||||
end;
|
||||
if FEditorOptions and EO_HOOKKEYUP = EO_HOOKKEYUP then begin
|
||||
FEditor.OnKeyUp := @EditorKeyUp;
|
||||
@ -8758,6 +8760,14 @@ begin
|
||||
{$ifdef dbgGrid}DebugLn('Grid.EditorKeyPress: END Key=',PrintKey);{$Endif}
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.EditorUTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char
|
||||
);
|
||||
begin
|
||||
FEditorKey := True;
|
||||
UTF8KeyPress(UTF8Key);
|
||||
FEditorKey := false;
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.EditorKeyUp(Sender: TObject; var key: Word;
|
||||
shift: TShiftState);
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user