diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2009-06-03 15:05:20 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2009-06-03 15:05:20 +0200 |
commit | f080fc0ac65c07198cbe3fe804332ffed8bb482e (patch) | |
tree | 9e8fd0d3e15b56ec4733ec32190679d2fff841a0 /extras/tiopf/gui | |
parent | e999fd7e6da1d5ae472bc9e3d7ad96d07ba9a963 (diff) | |
download | fpGUI-f080fc0ac65c07198cbe3fe804332ffed8bb482e.tar.xz |
GetFieldBounds was not implemented for many tiMediators.
Diffstat (limited to 'extras/tiopf/gui')
-rw-r--r-- | extras/tiopf/gui/tiMediators.pas | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/extras/tiopf/gui/tiMediators.pas b/extras/tiopf/gui/tiMediators.pas index 79b637ad..13cc4f97 100644 --- a/extras/tiopf/gui/tiMediators.pas +++ b/extras/tiopf/gui/tiMediators.pas @@ -331,7 +331,7 @@ var Mi, Ma: Integer; begin inherited; - if Subject.GetFieldBounds(FieldName,Mi,Ma) and (Ma>0) then + if Subject.GetFieldBounds(FieldName, Mi, Ma) and (Ma > 0) then FEditControl.MaxLength := Ma; if ObjectUpdateMoment in [ouOnChange,ouCustom] then FEditControl.OnChange := @DoOnChange @@ -406,8 +406,15 @@ begin end; procedure TMediatorSpinEditView.SetupGUIandObject; +var + Mi, Ma: Integer; begin inherited SetupGUIandObject; + if Subject.GetFieldBounds(FieldName, Mi, Ma) then + begin + FEditControl.MinValue := Mi; + FEditControl.MaxValue := Ma; + end; if ObjectUpdateMoment in [ouOnChange,ouCustom] then FEditControl.OnChange := @DoOnChange else @@ -444,7 +451,7 @@ var Mi, Ma: Integer; begin inherited; - if Subject.GetFieldBounds(FieldName,Mi,Ma) and (Ma>0) then + if Subject.GetFieldBounds(FieldName, Mi, Ma) then begin FEditControl.Min := Mi; FEditControl.Max := Ma; @@ -796,8 +803,15 @@ begin end; procedure TMediatorCalendarComboView.SetupGUIandObject; +var + Mi, Ma: TDateTime; begin inherited SetupGUIandObject; + if Subject.GetFieldBounds(FieldName, Mi, Ma) then + begin + FEditControl.MinDate := Mi; + FEditControl.MaxDate := Ma; + end; if ObjectUpdateMoment in [ouOnChange,ouCustom] then FEditControl.OnChange := @DoOnChange else @@ -867,8 +881,15 @@ begin end; procedure TMediatorSpinEditFloatView.SetupGUIandObject; +var + Mi, Ma: Integer; begin inherited SetupGUIandObject; + if Subject.GetFieldBounds(FieldName, Mi, Ma) then + begin + FEditControl.MinValue := Mi; + FEditControl.MaxValue := Ma; + end; if ObjectUpdateMoment in [ouOnChange,ouCustom] then FEditControl.OnChange := @DoOnChange else |