[Lazarus] Subroutine ?
DrDiettrich1 at aol.com
Wed Jul 31 14:50:04 CEST 2013
Frederic Da Vitoria schrieb:
> 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
> Previous answers made me wonder: are you sure you meant "Component", not
> "Control"? If the form contains non-visual components, this could change
> the result.
Components contains the components *owned* by the form, while
Controls contains only the top-level controls, whose *Parent* is the form.
More information about the Lazarus