Einzelnen Beitrag anzeigen

Benutzerbild von samson
samson

Registriert seit: 26. Aug 2003
Ort: Hövelhof Riege
105 Beiträge
 
Delphi 2007 Professional
 
#15

Re: Besitzt eine Komponente eine bestimmte Eigenschaft???

  Alt 7. Nov 2007, 16:05
Hallo Zusammen,

was haltet ihr denn von folgendem Ansatz:

1. neue Klasse erstellen

Delphi-Quellcode:
type
  TMyControl = class (TControl)
    public
      property PopupMenu;
  end;
2. Function zum überprüfen erstellen

Delphi-Quellcode:
function hasPopup(Sender :TObject) :boolean;
begin
  if Sender is TControl then
    result := assigned((Sender as TMyControl).PopupMenu);
end;
Probier mal aus.

Gruß


Frank
Frank Gellermann
Wer Informationen hat, hat Macht. Wer Macht hat, hat Informationen!!!
  Mit Zitat antworten Zitat