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:
00362685
Vues:
20
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform