Board index » delphi » Objects created during runtime

Objects created during runtime

How can I access the properties of an object (i.e. EditBox.Text "Test" or
s.th.]) that was created during runtime? I parented the EditBox with a
GroupBox.
So I try to access GroupBox1.Edit1
                                                ^ can't access : undefined
reference (or s.th. like that)

Then I try: X := GroupBox1.Components[0].Text
                                                                    ^
undefined again

Please Help!

R_F...@addcom.de

 

Re:Objects created during runtime


Quote
"Ronny Falk" <r_f...@addcom.de> wrote in message news:8sebhi$1ge$1@riker.addcom.de...
> How can I access the properties of an object (i.e. EditBox.Text "Test" or
> s.th.]) that was created during runtime? I parented the EditBox with a
> GroupBox.
> So I try to access GroupBox1.Edit1
>                                                 ^ can't access : undefined
> reference (or s.th. like that)

> Then I try: X := GroupBox1.Components[0].Text
>                                                                     ^
> undefined again

> Please Help!

Just access the EditBox as is!

You must have written something like:

EditBox := TEdit.Create(self);

So now all you have to do is:

EditBox.Text := 'Here I am!';

GRS

Other Threads