Re: passing data from one form to another

Posted by cpoye on February 26, 2009

In Reply to Re: passing data from one form to another posted by Louis Goodman on February 25, 2009

: : How do I populate list boxes on one form from a the main form.
: ------------

: If from the source code of a form you want to populate a component on another form, just prefix the names of the components of the other form with that form's name.

: Example: starting from the unit of Form1, put some data in Listbox1 and in Edit1 of Form2:

: procedure TForm1.Button1Click(Sender: TObject);
: begin
: Form2.Listbox1.Items[0] := 'ABC';
: Form2.Listbox1.Items[1] := 'DEF';
: Form2.Listbox1.Items[1] := 'GHI';
: Form2.Edit1.Test := '1000';
: end;
Thank you, Louis!

Do you know of a good book for learning the newer versions of Delphi. I have found several for v4 or older. I am looking for a book that has practice exercises at the end of each chapter.

Related articles


Follow Ups