diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-10-20 14:52:15 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-10-20 14:52:15 +0000 |
commit | 80750a1bf7e31bc77641d007972c06e46b7dde7e (patch) | |
tree | 90455a05647f47682c8f7f21d7fb8e8df60de2e9 | |
parent | fb7c292dff1c61c7b4b598687de59531febc629f (diff) | |
download | fpGUI-80750a1bf7e31bc77641d007972c06e46b7dde7e.tar.xz |
* Published new events for Calendar Combo.
* tiOPF: CalendarCombo mediator now hooks into the OnChange and OnExit event.
-rw-r--r-- | extras/tiopf/gui/tiMediators.pas | 10 | ||||
-rw-r--r-- | src/gui/fpg_popupcalendar.pas | 2 |
2 files changed, 12 insertions, 0 deletions
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} |