Enable/Disable all controls of the form

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #46165
    Marcos R.
    Participant

      I did it !

      Here is the code:

      Code:
      procedure Status(sForm: Tform; bHab: boolean);
      var
      iA : integer;
      AComponent: TComponent;
      begin
      for iA := 0 to sForm.ComponentCount – 1 do
      begin
      if sForm.Components[iA] is TsButton then
      begin
      AComponent := sForm.FindComponent(sForm.Components[iA].Name);
      if Assigned(AComponent) then
      if AComponent is TControl then
      TControl(AComponent).Enabled := bHab;
      end;
      end;
      end;

      Thanks,

      Marcos

      #46166
      gispos
      Participant

        What does this have to do with AlphaControls :cs:

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.