Einzelnen Beitrag anzeigen

Benutzerbild von Jelly
Jelly

Registriert seit: 11. Apr 2003
Ort: Moestroff (Luxemburg)
3.741 Beiträge
 
Delphi 2007 Professional
 
#2

Re: Designtime: Info über entfernte Komponente

  Alt 7. Sep 2004, 08:35
Hallo,

klar geht das, und zwar über die Notification Methode, die du im protected Bereich deklarierst... Etwa so:
Delphi-Quellcode:
interface

type
  TMeins = class (TComponent)
  private
    FEdit : TEdit ;
  protected
    procedure Notification (AComponent : TComponent; Operation : TOperation) ; override ;
  public
  published
    property Edit : TEdit read FEdit write FEdit ;
  end ; { end of TDBRTFReport }

implementation

{ TMeins }

procedure TMeins.Notification(AComponent: TComponent;
  Operation: TOperation);
begin
  inherited Notification (AComponent,operation) ;
     if (Operation = opRemove) then begin
        if (FEdit <> nil) and (AComponent = FEdit) then FEdit := nil ;
        { Die anderen Elemente auch hier auflisten }
     end ;
end;

end.
Gruß,
  Mit Zitat antworten Zitat