From 19843adc1254e0a782ed70d46d5bd02ce78cb77a Mon Sep 17 00:00:00 2001 From: ondrej Date: Fri, 9 Jun 2017 06:38:31 +0000 Subject: [PATCH] components: datetimepicker: TextForNullDate type TCaption - for translations git-svn-id: trunk@55271 - --- components/datetimectrls/datetimepicker.pas | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/datetimectrls/datetimepicker.pas b/components/datetimectrls/datetimepicker.pas index b2ff794ee4..c21f6b1813 100644 --- a/components/datetimectrls/datetimepicker.pas +++ b/components/datetimectrls/datetimepicker.pas @@ -148,7 +148,7 @@ type FReadOnly: Boolean; FMaxDate, FMinDate: TDate; FShowMonthNames: Boolean; - FTextForNullDate: String; + FTextForNullDate: TCaption; FTimeSeparator: String; FTimeDisplay: TTimeDisplay; FTimeFormat: TTimeFormat; @@ -230,7 +230,7 @@ type procedure SetReadOnly(const AValue: Boolean); procedure SetShowCheckBox(const AValue: Boolean); procedure SetShowMonthNames(AValue: Boolean); - procedure SetTextForNullDate(const AValue: String); + procedure SetTextForNullDate(const AValue: TCaption); procedure SetTime(const AValue: TTime); procedure SetTimeSeparator(const AValue: String); procedure SetTimeDisplay(const AValue: TTimeDisplay); @@ -372,7 +372,7 @@ type read FTrailingSeparator write SetTrailingSeparator; property ReadOnly: Boolean read FReadOnly write SetReadOnly default False; property LeadingZeros: Boolean read FLeadingZeros write SetLeadingZeros; - property TextForNullDate: String + property TextForNullDate: TCaption read FTextForNullDate write SetTextForNullDate; property NullInputAllowed: Boolean read FNullInputAllowed write SetNullInputAllowed default True; @@ -1213,7 +1213,7 @@ begin end; end; -procedure TCustomDateTimePicker.SetTextForNullDate(const AValue: String); +procedure TCustomDateTimePicker.SetTextForNullDate(const AValue: TCaption); begin if FTextForNullDate = AValue then Exit; @@ -2746,7 +2746,7 @@ begin if aKey in ['n', 'N'] then begin K := VK_N; CheckAndApplyKeyCode(K); - end else + end else CheckAndApplyKey(aKey); end; end; @@ -2989,7 +2989,7 @@ begin TextStyle.Opaque := False; TextStyle.RightToLeft := IsRightToLeft; - if DateIsNull and (FTextForNullDate > '') + if DateIsNull and (FTextForNullDate <> '') and (not (FTextEnabled and Focused)) then begin if IsRightToLeft then begin