RE: Array of controls
"Jeff Steinkamp - N7YG" <[email protected]>
| Newsgroups | gmane.comp.lang.delphi.programming |
|---|---|
| Message-ID | <000001c34c37$6ccdba40$1d250142@HAMRADIO> |
I knew it was simple. That has solved my problems and eliminated about 60% of the forms code. Thanks Jeff Steinkamp > -----Original Message----- > From: Felipe Rezek Mohallem [mailto:[email protected]] > Sent: 16 July, 2003 13:00 > To: [email protected] > Subject: Re: [Delphi] Array of controls > > > 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/ > > > ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Naturally Painless & Spray Away Backaches & Joint Pain. $19.97 http://www.challengerone.com/t/l.asp?cid=2867&lp=m331.html http://us.click.yahoo.com/tJIe0D/79VGAA/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/