[Lazarus] Subroutine ?

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Jul 31 20:50:55 CEST 2013


Frederic Da Vitoria schrieb:
> 2013/7/31 Hans-Peter Diettrich <DrDiettrich1 at aol.com 
> <mailto:DrDiettrich1 at aol.com>>

>     Components[] contains the components *owned* by the form, while
>     Controls[] contains only the top-level controls, whose *Parent* is
>     the form.
> 
> 
> OK, but since Components can be Controls or not, they could have an 
> Enabled property or not. So shouldn't the loop actually be something like:
> 
> for i := 0 to form.Components.Count - 1 do
>     if form.Components[i] is TControl
>         then form.Components[i].Enabled := False;
           then TControl(form.Components[i]).Enabled := False;

DoDi





More information about the Lazarus mailing list