Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddProperty for object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00362650
Message ID:
00362703
Vues:
15
Jim,

I don't know what I was thinking before. I guess I just needed some sleep because it's obvious to me now (after a good night's sleep) that this won't work!!!

It does strike me as ironic that AddObject can't accept an object reference.

>>Code:
>>
>>gofrm = create("form")
>>gotxt = create("textbox")
>>gotxt.visible = .t.
>>gofrm.addproperty("txt1",gotxt)
>>gofrm.show(1)
>>
>>Who can tell me why the textbox in this form is not visible?
>
>Brien,
>
>Because the textbox is NOT in the form. You have created a form, created a textbox, and given tehf rom a property that refers to the textbox. You have not place the textbox IN the form.
>
>Instead try this;
>
>
>goFrm = CreateObject("Form")
><strong>goFrm.AddObject("Text1","TextBox")</strong>
>goFrm.Text1.Visible = .T.
>goFrm.Visible = .T.
>
>
>AddObject is used to add an object into a container.
>
>You may also want to investigate the other method named NewObject that can add an object to a container.
Brien R. Givens

Brampwood Systems
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform