From 758c208d7d11975e0acd9282f0e653653f1584b7 Mon Sep 17 00:00:00 2001 From: jujibo Date: Tue, 30 Apr 2013 07:43:57 +0000 Subject: [PATCH] Fixed: TJDBGridControl Focus issues git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2734 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/jujiboutils/changes.txt | 1 + components/jujiboutils/src/jdbgridutils.pas | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/components/jujiboutils/changes.txt b/components/jujiboutils/changes.txt index 907e11c7d..b9ebd5f5a 100644 --- a/components/jujiboutils/changes.txt +++ b/components/jujiboutils/changes.txt @@ -5,6 +5,7 @@ Note: Lazarus Trunk required Version pre-1.1 -------------------------------------------------- +2013-04-29 Fixed: TJDBGridControl Focus issues 2013-01-03 Added: TJDbEnumCombo, like TDbComboBox but, uses itemindex instead of text 2012-09-20 Added: TJLabeledIntegerEdit and TJLabeledFloatEdit property CurrentValue 2012-06-12 Fixed: TJDbGridTimeCtrl, store time value diff --git a/components/jujiboutils/src/jdbgridutils.pas b/components/jujiboutils/src/jdbgridutils.pas index fcfb27071..8b56ba2b5 100644 --- a/components/jujiboutils/src/jdbgridutils.pas +++ b/components/jujiboutils/src/jdbgridutils.pas @@ -267,6 +267,7 @@ end; function TJDbGridStringCtrl.CanDefocus: boolean; begin + CellEditor.Visible := False; Result := True; end; @@ -458,7 +459,9 @@ begin else Result := True; if not Result then - ShowMessage(Format(SInvalidDateTime, [CellEditor.Text])); + ShowMessage(Format(SInvalidDateTime, [CellEditor.Text])) + else + CellEditor.Visible := False; end; { TJDbGridTimeCtrl } @@ -646,7 +649,9 @@ begin else Result := True; if not Result then - ShowMessage(Format(SInvalidTime, [CellEditor.Text])); + ShowMessage(Format(SInvalidTime, [CellEditor.Text])) + else + CellEditor.Visible := False; end; { TJDbGridDateCtrl } @@ -835,7 +840,9 @@ begin else Result := True; if not Result then - ShowMessage(Format(SInvalidDate, [CellEditor.Text])); + ShowMessage(Format(SInvalidDate, [CellEditor.Text])) + else + CellEditor.Visible := False; end; { TJDbGridDoubleCtrl } @@ -991,7 +998,9 @@ begin else Result := True; if not Result then - ShowMessage(Format(SInvalidNumber, [CellEditor.Text])); + ShowMessage(Format(SInvalidNumber, [CellEditor.Text])) + else + CellEditor.Visible := False; end; { TJDbGridIntegerCtrl } @@ -1116,7 +1125,9 @@ begin else Result := True; if not Result then - ShowMessage(Format(SInvalidNumber, [CellEditor.Text])); + ShowMessage(Format(SInvalidNumber, [CellEditor.Text])) + else + CellEditor.Visible := False; end; end.