From 4d82896a64d983fe54cd362cf4fff2954d149b38 Mon Sep 17 00:00:00 2001 From: zoran-vucenovic Date: Mon, 10 Feb 2014 14:24:21 +0000 Subject: [PATCH] Prevent combo date mode when day is not shown git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2898 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/ZVDateTimeCtrls/trunk/zvdatetimepicker.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/ZVDateTimeCtrls/trunk/zvdatetimepicker.pas b/components/ZVDateTimeCtrls/trunk/zvdatetimepicker.pas index fc4a5be81..d0c330b06 100644 --- a/components/ZVDateTimeCtrls/trunk/zvdatetimepicker.pas +++ b/components/ZVDateTimeCtrls/trunk/zvdatetimepicker.pas @@ -881,7 +881,6 @@ procedure TCustomZVDateTimePicker.SetKind(const AValue: TDateTimeKind); begin if FKind <> AValue then begin FKind := AValue; - UpdateShowArrowButton(FDateMode, AValue); AdjustEffectiveHideDateTimeParts; end; end; @@ -1767,6 +1766,7 @@ begin MoveSelectionLR(False); FRecalculatingTextSizesNeeded := True; + UpdateShowArrowButton(FDateMode, FKind); UpdateDate; end; end; @@ -3549,7 +3549,8 @@ begin DestroyUpDown; end else begin - ReallyShowArrowButton := (NewDateMode = dmComboBox) and (NewKind <> dtkTime); + ReallyShowArrowButton := (NewDateMode = dmComboBox) and + not (dtpDay in FEffectiveHideDateTimeParts); if (ReallyShowArrowButton <> Assigned(FArrowButton)) or (Assigned(FArrowButton) = Assigned(FUpDown)) then begin