From 448d4b0a2822727e4a12bceeef263caf5122d9d4 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 20 Jan 2025 11:43:19 +0100 Subject: [PATCH] lcl: added TCustomDateTimePicker.ShowCalendarForm --- components/datetimectrls/datetimepicker.pas | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/components/datetimectrls/datetimepicker.pas b/components/datetimectrls/datetimepicker.pas index 9e26bcd962..77b7450897 100644 --- a/components/datetimectrls/datetimepicker.pas +++ b/components/datetimectrls/datetimepicker.pas @@ -314,6 +314,7 @@ type procedure UndoChanges; virtual; procedure DropDownCalendarForm; virtual; + procedure ShowCalendarForm(aWrapper: TCalendarControlWrapper); virtual; function GetCheckBoxRect(IgnoreRightToLeft: Boolean = False): TRect; function GetDateTimePartFromTextPart(TextPart: TTextPart): TDateTimePart; @@ -681,7 +682,6 @@ type constructor CreateNewDTCalendarForm(AOwner: TComponent; ADTPicker: TCustomDateTimePicker); destructor Destroy; override; - published end; { TDateTimePicker } @@ -3762,10 +3762,16 @@ begin or (csDesigning in ComponentState)) then begin FCalendarForm := TDTCalendarForm.CreateNewDTCalendarForm(nil, Self); - FCalendarForm.Show; + ShowCalendarForm(TDTCalendarForm(FCalendarForm).Cal); end; end; +procedure TCustomDateTimePicker.ShowCalendarForm(aWrapper: TCalendarControlWrapper); +begin + if aWrapper=nil then ; + FCalendarForm.Show; +end; + { TDTUpDown } { When our UpDown control gets enabled/disabled, the two its buttons' Enabled