Board index » delphi » Disable all controls on form

Disable all controls on form

I need to disable all data aware controls on a form.  Is there an easy
way to do it.
Any help advice would be appreciated.

Thanks,
Joel Hynes
MarTech Systems, Inc.
jo...@dwave.net

 

Re:Disable all controls on form


On Fri, 09 Jan 1998 11:18:35 -0600, Joel Hynes <jo...@dwave.net>
wrote:

Quote
> I need to disable all data aware controls on a form.

Err, is this a trick question <g>. Use the TDataSet.DisableControls
method.

If you have more than one data set on the form, you could use this
approach:

procedure TForm1.DisableAllControls;
var
  I : Integer;
begin
  for I := 0 to (ComponentCount - 1) do
    if (Components[I] is TDataSet) then
      TDataSet(Components[I]).DisableControls;
end;

--
Rick Rogers (TeamB) | Fenestra Technologies

Other Threads