From 6717b45ffef4638f9c08b3802454f79b7415293a Mon Sep 17 00:00:00 2001 From: graemeg Date: Thu, 8 Nov 2007 14:41:21 +0000 Subject: * Implemented a new mediator for use with tiOPF for the Calendar component. * Removed the ColResize property from BaseGrid. It doesn't work as advertised. It needs to be implemented correctly. * Implemented MinDate, MaxDate properies for Calendar and did a lot more testing with a few more bugfixes. Still plenty outstanding. --- extras/tiopf/gui/tiGenericEditMediators.pas | 32 +++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'extras') diff --git a/extras/tiopf/gui/tiGenericEditMediators.pas b/extras/tiopf/gui/tiGenericEditMediators.pas index 878bbed9..4fe4f1d9 100644 --- a/extras/tiopf/gui/tiGenericEditMediators.pas +++ b/extras/tiopf/gui/tiGenericEditMediators.pas @@ -1,7 +1,6 @@ (* Revision history: - 2005-08-17: First release by Graeme Geldenhuys (graemeg@gmail.com) 2007-08-24: Ported the code to the fpGUI toolkit. [Graeme] @@ -30,10 +29,10 @@ uses ,gui_edit ,gui_checkbox ,gui_label -// ,Spin { TSpinEdit - standard component included in Lazarus LCL } ,gui_trackbar ,gui_combobox ,gui_memo + ,gui_popupcalendar ; type @@ -203,6 +202,17 @@ type end; + { Base class to handle TfpgCalendarCombo controls } + TMediatorCalendarComboView = class(TMediatorView) + private + function GetEditControl: TfpgCalendarCombo; + procedure SetEditControl(const AValue: TfpgCalendarCombo); + public + property EditControl: TfpgCalendarCombo read GetEditControl write SetEditControl; + class function ComponentClass: TClass; override; + end; + + { Data class for mapping a name to a class } TMediatorViewMapping = class(TObject) private @@ -930,6 +940,24 @@ begin Result := TfpgLabel; end; +{ TMediatorCalendarComboView } + +function TMediatorCalendarComboView.GetEditControl: TfpgCalendarCombo; +begin + Result := TfpgCalendarCombo(FEditControl); +end; + +procedure TMediatorCalendarComboView.SetEditControl(const AValue: TfpgCalendarCombo); +begin + FEditControl := AValue; +end; + +class function TMediatorCalendarComboView.ComponentClass: TClass; +begin + Result := TfpgCalendarCombo; +end; + + initialization finalization gMediatorFactory.Free; -- cgit v1.2.3-70-g09d2