![]() |
Indiziert Labels
Gibt es eine Möglichkeit Labels als Arrays zu indizieren, damit man in for Schleifen zu Direktausgaben kommen kann?
Gruss Peter Kaschubowski |
Re: Indiziert Labels
Gibt es...
z.B.:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var z,i:integer; a:Array[0..10] of TComponent; // mal als Beispiel nur 11 begin z:=-1; For i:=0 to form1.ComponentCount-1 do begin if (form1.Components[i] is TLabel) then begin inc(z); a[z]:=form1.Components[i]; end; end; For i:=0 to z do (a[i] as TLabel).Caption:=IntTostr(i); //Bsp. Caption fuellen end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:43 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz