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 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'extras/tiopf/gui') 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; -- cgit v1.2.3-70-g09d2