Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AddProperty for object
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00362650
Message ID:
00362685
Views:
21
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform