[Lazarus] Subroutine ?

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Jul 31 07:00:21 CEST 2013


Terry A. Haimann schrieb:
> I am sure this is a dumb ?, but I want a subroutine that will change all
> of the components of a form to Enabled := False.
> 
> How do I do this?

This code disables all components owned by form:

for i := 0 to form.Components.Count - 1 do
   form.Components[i].Enabled := False;

Untested, eventually Components.Count has to be replaced by ComponentCount.

DoDi





More information about the Lazarus mailing list