新手学习完这个帖子后,加了句提示哪个edit为空的代码,每天收获一点点...
http://topic.csdn.net/u/20071222/13/89be406c-59bc-4c35-bd93-0805de8b6e92.html?seed=390184057&r=55784577#r_55784577
procedure TForm1.Button1Click(Sender: TObject);
var
I:Integer;
const
arr: array[0..1] of string = ('edit1为空', 'edit2为空');
begin for I := 0 to grp1.ControlCount - 1 do begin
if grp1.Controls[i] is TEdit then
begin
if (grp1.Controls[i] as TEdit).Text = '' then
begin
showmessage(arr[i]);
end;
end;
end; // for
end;
http://topic.csdn.net/u/20071222/13/89be406c-59bc-4c35-bd93-0805de8b6e92.html?seed=390184057&r=55784577#r_55784577
procedure TForm1.Button1Click(Sender: TObject);
var
I:Integer;
const
arr: array[0..1] of string = ('edit1为空', 'edit2为空');
begin for I := 0 to grp1.ControlCount - 1 do begin
if grp1.Controls[i] is TEdit then
begin
if (grp1.Controls[i] as TEdit).Text = '' then
begin
showmessage(arr[i]);
end;
end;
end; // for
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货