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 :=
2013/7/31 Hans-Peter Diettrich drdiettri...@aol.com
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
On Wed, 31 Jul 2013 10:04:49 +0200
Frederic Da Vitoria davito...@gmail.com wrote:
2013/7/31 Hans-Peter Diettrich drdiettri...@aol.com
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.
On 2013-07-31 04:53, Terry A. Haimann wrote:
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.
Not sure if you wanted controls to be disabled or readonly (when
possible)...
If you wanted the latter, then tiOPF has a
Hi Mattias
On 31 July 2013 11:00, lazarus-requ...@lists.lazarus.freepascal.org wrote:
TComponent does not have Enabled. So the above code does not work.
TControl has Enabled.
Disabling a control (e.g. no focus, some widgetsets draw them
gray) automatically disables child controls. So the
Interesting and I didn't know you could do that. But, more of what I
have in mind is.
I have a bunch of database components on a form, I want them to be
enabled only after hitting the edit or insert button on the DbNavigator.
Since this is going to occur in multiple points in my button
2013/7/31 Terry A. Haimann te...@haimann.us
Interesting and I didn't know you could do that. But, more of what I
have in mind is.
I have a bunch of database components on a form, I want them to be
enabled only after hitting the edit or insert button on the DbNavigator.
Since this is going
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
ComponentCount.
DoDi
Previous answers made me
Chavoux Luyt schrieb:
On 31 July 2013 11:00, lazarus-requ...@lists.lazarus.freepascal.org
mailto:lazarus-requ...@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
I am talking mostly about TDBEdit and a few TDBComboBox objects.
On Wed, 2013-07-31 at 11:00 +0200, Mattias Gaertner wrote:
On Wed, 31 Jul 2013 10:04:49 +0200
Frederic Da Vitoria davito...@gmail.com wrote:
2013/7/31 Hans-Peter Diettrich drdiettri...@aol.com
Terry A. Haimann schrieb:
On Wed, 31 Jul 2013 12:09:44 +0100
Chavoux Luyt chav...@gmail.com wrote:
[...]
Just a related question on this:
What happens afterwards when I say Form1.Enabled:=true; ?
Form1.Enabled does not change the 'Enabled' values of child controls.
A control is enabled if itself and all its parents
On Wed, 31 Jul 2013 07:23:02 -0500
Terry A. Haimann te...@haimann.us wrote:
Interesting and I didn't know you could do that. But, more of what I
have in mind is.
I have a bunch of database components on a form, I want them to be
enabled only after hitting the edit or insert button on the
2013/7/31 Hans-Peter Diettrich drdiettri...@aol.com
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
Frederic Da Vitoria schrieb:
2013/7/31 Hans-Peter Diettrich drdiettri...@aol.com
mailto:drdiettri...@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
2013/7/31 Hans-Peter Diettrich drdiettri...@aol.com
Frederic Da Vitoria schrieb:
2013/7/31 Hans-Peter Diettrich drdiettri...@aol.com mailto:
drdiettri...@aol.com
Components[] contains the components *owned* by the form, while
Controls[] contains only the top-level controls, whose
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?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
On Tue, 30 Jul 2013 22:53:40 -0500
Terry A. Haimann te...@haimann.us wrote:
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?
for i:=0 to ControlCount-1 do
Controls[i].Enabled:=false;
Mattias
--
17 matches
Mail list logo