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:
01101033
Views:
13
Hi David,

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,
>
>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform