Delphi-Quellcode:
procedure TComponentManager.NewControl;
var
lBasic: IBasic;
lComboBox: IComboBox;
begin
lBasic := AClass.Create(TWinControl( FWorkPanel ));
with lBasic do
begin
IComponent := AType;
Name := AName;
Title := ATitle;
Hint := AHint;
Left := ALeft;
Top := ATop;
Width := AWidth;
Height := AHeight;
Value := AValue;
end;
if lBasic.QueryInterface(IComboBox, lComboBox) = 0 then
lComboBox.List := AList;
FControlList.Add( lBasic );
end;
Edit, das sollte ja eigentlich bereits klar sein:
Delphi-Quellcode:
procedure TComponentManager.DisposeControls;
begin
FControlList.Clear;
end;