Chavoux Luyt schrieb:
On 31 July 2013 11:00, <[email protected]
<mailto:[email protected]>> 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
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus