我要把这些edit的text都设为空
比如
( (zknumber.Text='') and (Number.Text='') and ( NameEdit.Text='') and ( people.Text='')
and (zzmm.Text='') and (old.Text='') and (love.Text='') and (Address.Text='') and
(idcard.Text='')and ( score.Text='') and ( tel_number.text='') and ( moble.Text='') and
(post_number.Text='') and ( scl_graduate.Text='') and (graduate_school.Text='' )and
(g_specialty.Text='') and (Ntype.Text='') and ( father_name.Text='') and (father_duty.Text='' )and
(f_tel.Text='') and (mother_name.Text='') and ( mother_duty.Text='' )and
(linkman_name.Text='') and(specialty.Text='' )
请问有没有更简便的方法将他们设为空?????????????
比如
( (zknumber.Text='') and (Number.Text='') and ( NameEdit.Text='') and ( people.Text='')
and (zzmm.Text='') and (old.Text='') and (love.Text='') and (Address.Text='') and
(idcard.Text='')and ( score.Text='') and ( tel_number.text='') and ( moble.Text='') and
(post_number.Text='') and ( scl_graduate.Text='') and (graduate_school.Text='' )and
(g_specialty.Text='') and (Ntype.Text='') and ( father_name.Text='') and (father_duty.Text='' )and
(f_tel.Text='') and (mother_name.Text='') and ( mother_duty.Text='' )and
(linkman_name.Text='') and(specialty.Text='' )
请问有没有更简便的方法将他们设为空?????????????
for i:= 0 to Form1.ComponentCounts - 1 do
begin
if Form1.Components[i] is TEdit then
if (Form1.Components[i] as TEdit).Tag=1 then
(Form1.Components[i] as TEdit).Text := '';
end;
if Form1.Controls[I] is TEdit then
(Form1.Controls[I] as TEdit).Text:='';