Thema: Delphi Labels in ein Array?

Einzelnen Beitrag anzeigen

Splinter

Registriert seit: 24. Jan 2004
Ort: Oppenheim
43 Beiträge
 
Delphi 7 Enterprise
 
#8

Re: Labels in ein Array?

  Alt 29. Jan 2004, 13:23
Zitat von Gepard:
Sorry sieht sehr blöd aus
Delphi-Quellcode:
var
          i, x: Integer
        begin
          for i := 1 to n do
            x := a[i-1]
        end;
ich weiß schon im groben wie man nen arry umgeht aber halt nich wenn ich das mit nem label machen will

@gekmihesg


also wenn ich schreibe
Delphi-Quellcode:
procedure sichtbareTageeins;
 var i: Integer;
Procedure tagsichtbar(tag: Tlabel);
begin
 If Unit1.Form1.tag.Visible = true
  Then Unit1.Form1.Memo2.lines.Add(tag.name);
 end;
 
begin
for i := 1 to 7 do
  tagsichtbar((findocomponent('Label'+inttostr(i)) as TLabel));
end;
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


luckie hast vielleicht auch ne idee wie man das umsetzen kann?
  Mit Zitat antworten Zitat