[Lazarus] Subroutine ?
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Wed Jul 31 15:02:13 CEST 2013
Chavoux Luyt schrieb:
> On 31 July 2013 11:00, <lazarus-request at lists.lazarus.freepascal.org
> <mailto:lazarus-request at lists.lazarus.freepascal.org>> wrote:
>
>
> TComponent does not have Enabled. So the above code does not work.
> TControl has Enabled.
Thanks, I missed that.
> Disabling a control (e.g. no focus, some widgetsets draw them
> gray) automatically disables child controls. So the easiest way
> to disable all controls on a form is to set Form1.Enabled:=false.
>
> Mattias
>
> Just a related question on this:
> What happens afterwards when I say Form1.Enabled:=true; ?
> If some controls were enabled beforehand and some were disabled, will
> this be remembered or will I need to enable them one-by-one or will all
> controls be enabled by default?
Enabling/disabling a Parent does not change the Enabled *values* of its
child controls. Child controls of a disabled Parent are disabled
implicitly, by e.g. message processing logic.
DoDi
More information about the Lazarus
mailing list