diff options
Diffstat (limited to 'extras/tiopf/gui/tiMediators.pas')
-rw-r--r-- | extras/tiopf/gui/tiMediators.pas | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extras/tiopf/gui/tiMediators.pas b/extras/tiopf/gui/tiMediators.pas index 828a5eb8..2825c1f4 100644 --- a/extras/tiopf/gui/tiMediators.pas +++ b/extras/tiopf/gui/tiMediators.pas @@ -508,8 +508,10 @@ end; procedure TMediatorDynamicComboBoxView.SetListObject(const AValue: TtiObjectList); begin - Inherited; + inherited; InternalListRefresh; + if Assigned(ValueList) then + EditControl.Enabled := ValueList.Count > 0; end; procedure TMediatorDynamicComboBoxView.InternalListRefresh; @@ -565,7 +567,9 @@ begin if UseInternalOnChange then EditControl.OnChange := @DoOnChange; // default OnChange event handler - EditControl.Enabled := (ValueList.Count > 0); + {$Note As far as I can see, ValueList is always going to be nil here! - Graeme } + if ValueList <> nil then + EditControl.Enabled := (ValueList.Count > 0); end; procedure TMediatorDynamicComboBoxView.DoGuiToObject; |