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