{********************************************************** *****} {Desined for has I identical controls, how to specify to i. } {Copyright (c) 2003-2004 reserved} {mail to Wanghongbott123@163.com with any quest} {**************************** ************************************} Unit unit1;
Interface
Uses Windows, Messages, Sysutils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Stdctrls;
TYPE TFORM1 = Class (TFORM) Edit1: Tedit; Edit2: Tedit; Edit3: Tedit; Edit4: Tedit; Edit5: Tedit; Edit6: Tedit; Edit 7: Tedit; TEDIT; TEDIT; TEDIT; TEDIT; TEDIT; ; Edit11: tedit; procedure button1click (sender: TOBJECT); private {private declarations} end;
Var Form1: TFORM1;
IMPLEMENTATION
{$ R * .dfm}
Procedure TForm1.Button1Click (Sender: Tobject); Vari, J, Num: Integer; Begin if Edit11.Text <> 'TEN // Edit11 Is You Input Num Begin Num: = STRTOINT (Edit11.Text); J: = 0 For i: = 0 to ComponentCount-1 Do Begin J: = J 1; IF J = Num Ten TEDIT (Form1.comPonents [J-1]). Text: = 'OK'; End; End; End; End; .