Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Put a button object in an existing form
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01100032
Message ID:
01101100
Views:
12
>Thanks for your further explantion. So in order for a GUI object to appear in a form, it must be created in the context of the form, I can't just pass an already fabricated GUI object, a button for example, to a running form and ask the form to "contain" it, and hence show it. I guess that is all about the event loop as you said...

David,

Yes. In order for an object to be a visible element of a form it either needs to be put there at design time, or added at runtime with an thisform.AddObject() method call.

You can reference non-visual objects from a form like this:
* form.Init
lparameter roManager

this.oFormsManager = roManager
this.oService = createobject( "cServiceX" )

* some other form method
this.oFormsManager.DoSomethingForMe()
this.oService.GetXMLDoc(...)
but these two other objects are not visible parts of the form itself.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform