![]() |
Problem mit FindComponent
Hi,
ich habe eine größere Form. Eine Gruppe Labels muß ich einer Sonderbehandlung unterziehen. Ungefähr so :
Delphi-Quellcode:
In diesem Falle sind es für Testzwecke 2 Labels. Die heißen Label8 und Label9. Wieso wird kein X angezeigt ?
for i := 8 to 9 do
TLabel (FindComponent ('Label'+IntToStr(i))).Caption := 'X'; |
Re: Problem mit FindComponent
Delphi-Quellcode:
... vielleicht? (MainForm durch den Namen des Parents des Labels ersetzen)
for i := 8 to 9 do
TLabel(MainForm.FindComponent ('Label'+IntToStr(i))).Caption := 'X'; mfG mirage228 |
Re: Problem mit FindComponent
Moin Hansa,
funktioniert doch einwandfrei. :gruebel: |
Re: Problem mit FindComponent
Dubioser Effekt. Wenn man die Form für Findcomponent explizit angibt, geht es immer. Ansonsten nur manchmal. :shock: Einen Zusammenhang kann ich nicht erkennen.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 18: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