Thema: Delphi Labels in ein Array?

Einzelnen Beitrag anzeigen

Nightshade

Registriert seit: 7. Jan 2003
Ort: Menden
192 Beiträge
 
Delphi 7 Enterprise
 
#7

Re: Labels in ein Array?

  Alt 29. Jan 2004, 13:21
Zitat von Splinter:
also wenn ich schreibe
...
mag er das auch nich
([Error] Unit1.pas(195): Record, object or class type required
[Error] Unit1.pas(200): For loop control variable must be simple local variable
[Error] Unit1.pas(201): Undeclared identifier: 'findocomponent'
[Error] Unit1.pas(201): Operator not applicable to this operand type)

usw
Delphi-Quellcode:
procedure sichtbareTageeins;

 var i: Integer;

  Procedure tagsichtbar(Mytag: Tlabel);
  begin
    If Mytag.Visible Then
      Form1.Memo2.lines.Add(Mytag.name);
  end;
 
begin
  for i := 1 to 7 do
    tagsichtbar((findcomponent('Label'+inttostr(i)) as TLabel));
end;

Mag daran liegen, das Form1.tag eine vorhandene Variable ist.
Versuchs mal so wie oben ...
Christian
Killing for peace is like fucking for virginity

Nightshade
  Mit Zitat antworten Zitat