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:
01100426
Views:
10
David,

In order for an object to be part of the event loop, meaning a user can interact with it (see it, click it, type into it), it must be a contained object of a form. Which means that you have to thisform.AddObject() the object to the form. Non-form objects that are instantiated with CreateObject() are never part of the event loop, and as Sergey said you can't make an already existing object part of another object.

>Is it possible to put an existing button object on the surface of an existing form? e.g. as in the code below, is there a way to make the button 'ob' show up in the form 'of'?
>
>ob = createobject('commandbutton')
>of = createobject('form')
>of.show(1)
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