Einzelnen Beitrag anzeigen

Blup

Registriert seit: 7. Aug 2008
Ort: Brandenburg
1.429 Beiträge
 
Delphi 10.4 Sydney
 
#9

Re: Ungültige Zeigeroperation Plugin mit interface

  Alt 8. Jul 2009, 08:47
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;
  Mit Zitat antworten Zitat