Beispiel für beliebig viele Controls, z.B. TEdits, die auf einem Panel liegen:
Delphi-Quellcode:
for i:= 0 to Panel_Filter.ControlCount-1 do begin
if Panel_Filter.Controls[i] is TLabel then
(Panel_Filter.Controls[i] as TLabel).Font.Style:= []
else if Panel_Filter.Controls[i] is TEdit then
(Panel_Filter.Controls[i] as TEdit).Text:= ''
else if Panel_Filter.Controls[i] is TMaskEdit then
(Panel_Filter.Controls[i] as TMaskEdit).Text:= ''
else if Panel_Filter.Controls[i] is TCheckBox then
(Panel_Filter.Controls[i] as TCheckBox).Checked:= false
else if Panel_Filter.Controls[i] is TComboBox then
(Panel_Filter.Controls[i] as TComboBox).ItemIndex:= 0;
end;