function Tform1.isnotnull():boolean;
var
I: Integer;
begin
for I := 0 to ComponentCount - 1 do
if Components[I] is TEdit then
if TEdit(Components[I]).Text = '' then
begin
result:=false;
exit;
end;
result:=true;
end;
var
I,count: Integer;
begin
count:=0;
for I := 0 to ComponentCount - 1 do
if Components[I] is TEdit then
if TEdit(Components[I]).Text <> '' then
inc(count);
if count=70 then
//70个Edit控件,它们的Text属性都不为空要经常的操作
end;
var
I: Integer;
begin
for I := 0 to ComponentCount - 1 do
if Components[I] is TEdit then
if TEdit(Components[I]).Text <> '' then
begin
ShowMessage(Components[I].Name + ' is not null.');
Abort;
end;
end;