From 80750a1bf7e31bc77641d007972c06e46b7dde7e Mon Sep 17 00:00:00 2001 From: graemeg Date: Mon, 20 Oct 2008 14:52:15 +0000 Subject: * Published new events for Calendar Combo. * tiOPF: CalendarCombo mediator now hooks into the OnChange and OnExit event. --- extras/tiopf/gui/tiMediators.pas | 10 ++++++++++ src/gui/fpg_popupcalendar.pas | 2 ++ 2 files changed, 12 insertions(+) diff --git a/extras/tiopf/gui/tiMediators.pas b/extras/tiopf/gui/tiMediators.pas index c6b62bd0..2cc11bbb 100644 --- a/extras/tiopf/gui/tiMediators.pas +++ b/extras/tiopf/gui/tiMediators.pas @@ -192,6 +192,7 @@ type protected function GetGUIControl: TComponent; override; procedure SetGUIControl(const AValue: TComponent);override; + procedure SetupGUIandObject; override; public constructor Create; override; property EditControl: TfpgCalendarCombo read FEditControl write FEditControl; @@ -736,6 +737,15 @@ begin inherited SetGUIControl(AValue); end; +procedure TMediatorCalendarComboView.SetupGUIandObject; +begin + inherited SetupGUIandObject; + if ObjectUpdateMoment in [ouOnChange,ouCustom] then + FEditControl.OnChange := @DoOnChange + else + FEditControl.OnExit := @DoOnChange; +end; + constructor TMediatorCalendarComboView.Create; begin inherited Create; diff --git a/src/gui/fpg_popupcalendar.pas b/src/gui/fpg_popupcalendar.pas index ae18f871..d252783d 100644 --- a/src/gui/fpg_popupcalendar.pas +++ b/src/gui/fpg_popupcalendar.pas @@ -184,6 +184,8 @@ type property OnChange; property OnCloseUp; property OnDropDown; + property OnEnter; + property OnExit; end; {@VFD_NEWFORM_DECL} -- cgit v1.2.3-70-g09d2