摘要:
有10个EDIT控件,取名为EDT1,EDT2,EDT3。。。EDT10,如何用一个循环知道哪个EDIT控件的值是空的?procedure TForm1.Button2Click(Sender: TObject); var I:integer; begin for i:=0 to Self.Componentcount-1 do//Self.Componentcount就是TForm1的控件数量 begin if Self.Components[i] is TEdit then //判断控件是否为TEdit beg... 阅读全文
摘要:
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, ToolWin, ExtCtrls;type TForm1 = class(TForm) tlb1: TToolBar; btn1: TToolButton; pnl1: TPanel; btn2: TToolButton; procedure btn1Click(Sender: TObject); procedure btn2Click(Sender: TO 阅读全文