tvplanit: Fix VpDayView, VpWeekView and VpTaskList inplace editor to cancel input when ESC is pressed (like VpContactGrid, see prev commit).

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6480 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-06-09 11:42:09 +00:00
parent 5f0337539e
commit ad07af3511
3 changed files with 7 additions and 3 deletions

View File

@ -109,7 +109,7 @@ type
{ Forward Declarations } { Forward Declarations }
TVpDayView = class; TVpDayView = class;
TVpDvInPlaceEdit = class(TCustomEdit) TVpDvInplaceEdit = class(TCustomEdit)
protected{private} protected{private}
procedure CreateParams(var Params: TCreateParams); override; procedure CreateParams(var Params: TCreateParams); override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override; procedure KeyDown(var Key: Word; Shift: TShiftState); override;
@ -583,6 +583,7 @@ begin
VK_ESCAPE: VK_ESCAPE:
begin begin
Key := 0; Key := 0;
Hide;
TVpDayView(Owner).SetFocus; TVpDayView(Owner).SetFocus;
end; end;

View File

@ -477,7 +477,9 @@ begin
VK_ESCAPE: VK_ESCAPE:
begin begin
Key := 0; Key := 0;
TaskList.EndEdit(Self); Hide;
TaskList.SetFocus;
// TaskList.EndEdit(Self);
end; end;
else else

View File

@ -373,7 +373,8 @@ begin
VK_ESCAPE: VK_ESCAPE:
begin begin
Key := 0; Key := 0;
Grid.EndEdit(self); Hide;
Grid.SetFocus;
end; end;
else else