Thema: Delphi TComponent + Array

Einzelnen Beitrag anzeigen

Premutos

Registriert seit: 6. Mär 2005
51 Beiträge
 
#4

Re: TComponent + Array

  Alt 1. Dez 2005, 16:32
hmm hab schon das nächste problem

habe das array mit den kompo klassen gefüllt und möchte jetzt überprüfen ob sich diese klasse welche in comp steckt im array befindet!

Code:
comps : array['a'..'z'] of TComponentClass;
Comp: TComponent;

begin

comps['a'] := Tbutton;
comps['b'] := TLabel;
...
comp:=Form1.Components[x];

if comp is (im array) then
(Comp as .(".").).Name;
  Mit Zitat antworten Zitat