Re: Array of controls
"Felipe Rezek Mohallem" <[email protected]>
| Newsgroups | gmane.comp.lang.delphi.programming |
|---|---|
| Message-ID | <[email protected]> |
var
Form1: TForm1;
MyEdits : Array [ 1..10 ] of TEdit;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
var
i : integer;
begin
for i := 1 to 10 do
begin
MyEdits[i] := TEdit.Create ( Self );
MyEdits[i].Parent := Self;
MyEdits[i].Left := i * 30;
MyEdits[i].Top := i * 20;
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
var
i : integer;
begin
for i := 1 to 10 do
begin
MyEdits[i].Free;
end;
end;
Best Reggards,
Felipe
----- Original Message -----
From: Jeff Steinkamp - N7YG
To: Delphi Yahoo Group
Sent: Wednesday, July 16, 2003 4:43 PM
Subject: [Delphi] Array of controls
There is probably a very simple method to this, but it escapes me. How
do I create an array of controls. For instance. I want 10 Tedit
controls on a form all named Freq. I want to be able to access the
controls using the name and array position. Such as Freq[0] through
Freq[10].
Thanks
Jeff Steinkamp
Yahoo! Groups Sponsor
ADVERTISEMENT
CodeCoffer - new Delphi code protection Tool!
http://www.delphicollection.com/public/CodeCoffer.htm
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
---------------------------------------------------------------
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/GHXcIA/n.WGAA/ySSFAA/i7folB/TM
---------------------------------------------------------------------~->
CodeCoffer - new Delphi code protection Tool!
http://www.delphicollection.com/public/CodeCoffer.htm
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
---------------------------------------------------------------
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/