Código
[]´s
Jorge Ericsson Silva Pinheiro
Programador Delphi
procedure TForm1.HabilitarCampos;
begin
for x := 0 to Self.ComponentCount - 1 do
begin
if Components[x] is TCustomEdit then (Components[x] as TCustomEdit).Enabled := True
else if Components[x] is TComboBox then (Components[x] as TComboBox).Enabled := True
else if Components[x] is TDBLooKupComboBox then (Components[x] as TDBLooKupComboBox).Enabled := True
else if Components[x] is TCheckBox then (Components[x] as TCheckBox).Enabled := True
else if Components[x] is TRadioGroup then (Components[x] as TRadioGroup).Enabled := True
else if Components[x] is TMaskEdit then (Components[x] as TMaskEdit).Enabled := True;
end;
end;
procedure TForm1.DesabilitarCampos;
begin
for x := 0 to Self.ComponentCount - 1 do
begin
if Components[x] is TCustomEdit then (Components[x] as TCustomEdit).Enabled := False
else if Components[x] is TComboBox then (Components[x] as TComboBox).Enabled := False
else if Components[x] is TDBLooKupComboBox then (Components[x] as TDBLooKupComboBox).Enabled := False
else if Components[x] is TCheckBox then (Components[x] as TCheckBox).Enabled := False
else if Components[x] is TRadioGroup then (Components[x] as TRadioGroup).Enabled := False;
end;
end;
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009