From ad07af35112ae9243e16fdcf234dea6d623c5f9f Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sat, 9 Jun 2018 11:42:09 +0000 Subject: [PATCH] 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 --- components/tvplanit/source/vpdayview.pas | 3 ++- components/tvplanit/source/vptasklist.pas | 4 +++- components/tvplanit/source/vpweekview.pas | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/components/tvplanit/source/vpdayview.pas b/components/tvplanit/source/vpdayview.pas index 8430da033..a3850939d 100644 --- a/components/tvplanit/source/vpdayview.pas +++ b/components/tvplanit/source/vpdayview.pas @@ -109,7 +109,7 @@ type { Forward Declarations } TVpDayView = class; - TVpDvInPlaceEdit = class(TCustomEdit) + TVpDvInplaceEdit = class(TCustomEdit) protected{private} procedure CreateParams(var Params: TCreateParams); override; procedure KeyDown(var Key: Word; Shift: TShiftState); override; @@ -583,6 +583,7 @@ begin VK_ESCAPE: begin Key := 0; + Hide; TVpDayView(Owner).SetFocus; end; diff --git a/components/tvplanit/source/vptasklist.pas b/components/tvplanit/source/vptasklist.pas index b76c93008..8d9e4eaea 100644 --- a/components/tvplanit/source/vptasklist.pas +++ b/components/tvplanit/source/vptasklist.pas @@ -477,7 +477,9 @@ begin VK_ESCAPE: begin Key := 0; - TaskList.EndEdit(Self); + Hide; + TaskList.SetFocus; +// TaskList.EndEdit(Self); end; else diff --git a/components/tvplanit/source/vpweekview.pas b/components/tvplanit/source/vpweekview.pas index 2345d392d..60a5a6a50 100644 --- a/components/tvplanit/source/vpweekview.pas +++ b/components/tvplanit/source/vpweekview.pas @@ -373,7 +373,8 @@ begin VK_ESCAPE: begin Key := 0; - Grid.EndEdit(self); + Hide; + Grid.SetFocus; end; else