Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by Michael Habbe,
27. Jul 2006
Sicherheitshalber auch noch nach Label schauen:
for I := 0 to Application.ComponentCount-1 do
begin
if Application.Components(I) is TForm then
begin
for i2 := 0 to TForm(Application.Components(I)).ComponentCount -1 do
if TForm(Application.Components(I)).Components is TLabel then // <-- hier
TLabel(TForm(Application.Components(I)).Components).Font.Color := clRed;
...
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by Michael Habbe,
27. Jul 2006
Denn habe ich diesen Kasten aber auch schon gehabt. In den letzen Tagen. :gruebel:
Sicherheitshalber auch noch nach Label schauen:
for I := 0 to Application.ComponentCount-1 do
begin
if Application.Components(I) is TForm then
begin
for i2 := 0 to TForm(Application.Components(I)).ComponentCount -1 do
if TForm(Application.Components(I)).Components is TLabel then
...
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by Michael Habbe,
27. Jul 2006
Tja, Du wirst nicht drumrum kommen, diese Funktion für jedes Formular umzusetzen. Mir ist keine Funktion bekannt, wo man als Ergebnis die Namen der kreierten Formulare in z.B. einer StringList zurückbekommt.
Am besten im FormCreate für jedes Formular:
for I := 0 to ComponentCount-1 do
if Components(I) is TLabel then
TLabel(Components(I)).Font.Color := frmMain.myLabelColor; //...