Board index » delphi » Set property to all object in a form

Set property to all object in a form

Hello!

I want to set a property to all DBEdit objects in a form
without settin them individually.
for-loop?

A code snippet please!

Thanks

 

Re:Set property to all object in a form


Quote
"Kurt Anneborg" <kurt.anneb...@telia.com> wrote in message

news:RDZW8.47070$n4.11341090@newsc.telia.net...

Quote
> Hello!

> I want to set a property to all DBEdit objects in a form
> without settin them individually.
> for-loop?

> A code snippet please!

for i := 0 to (ComponentCount - 1) do
    begin
    if Components [i] is tDBEdit
    then tDBEdit (Components [i]).Color := clRed;
    end;

Other Threads