![]() |
Caption zuweisung abkürzen
Hallo.
Ich habe mal ne Frage. In einem Programm muss ich 20 Zufallszahlen erstellen und sie einem Label zuweisen. Also habe ich es einfach so gemacht:
Delphi-Quellcode:
Geht das auch kürzer?
Label1.Caption := IntToStr(Random(10000000000));
Label2.Caption := IntToStr(Random(10000000000)); Label3.Caption := IntToStr(Random(10000000000)); Label4.Caption := IntToStr(Random(10000000000)); Label5.Caption := IntToStr(Random(10000000000)); Label6.Caption := IntToStr(Random(10000000000)); Label7.Caption := IntToStr(Random(10000000000)); Label8.Caption := IntToStr(Random(10000000000)); Label9.Caption := IntToStr(Random(10000000000)); Label10.Caption := IntToStr(Random(10000000000)); Label11.Caption := IntToStr(Random(10000000000)); Label12.Caption := IntToStr(Random(10000000000)); Label13.Caption := IntToStr(Random(10000000000)); Label14.Caption := IntToStr(Random(10000000000)); Label15.Caption := IntToStr(Random(10000000000)); Label16.Caption := IntToStr(Random(10000000000)); Label17.Caption := IntToStr(Random(10000000000)); Label18.Caption := IntToStr(Random(10000000000)); Label19.Caption := IntToStr(Random(10000000000)); Label20.Caption := IntToStr(Random(10000000000)); Dennis |
Re: Caption zuweisung abkürzen
Ja, es geht kürzer.
Schau dir mal findcomponent an. |
Re: Caption zuweisung abkürzen
Danke :thumb:
Sowas habe ich gesucht. Dennis |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:27 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 by Thomas Breitkreuz