Thema: Delphi Frage zum "is"-Operator

Einzelnen Beitrag anzeigen

Benutzerbild von Sir Rufo
Sir Rufo

Registriert seit: 5. Jan 2005
Ort: Stadthagen
9.454 Beiträge
 
Delphi 10 Seattle Enterprise
 
#2

AW: Frage zum "is"-Operator

  Alt 23. Jan 2014, 15:39
Delphi-Quellcode:
var
  LWinControl : TWinControl;

if Assigned( Self.ActiveControl ) and ( Self.ActiveControl is TWinControl ) then
begin
  LWinControl := Self.ActiveControl as TWinControl;
  ...
end
Kaum macht man's richtig - schon funktioniert's
Zertifikat: Sir Rufo (Fingerprint: ‎ea 0a 4c 14 0d b6 3a a4 c1 c5 b9 dc 90 9d f0 e9 de 13 da 60)
  Mit Zitat antworten Zitat