Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add existing object to form
Message
 
 
À
03/06/2003 22:07:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00795977
Message ID:
00795991
Vues:
13
David,

Nope, an already existing object can not be added to some other object. Also an object must be in the containership of a form (AddObject'd to the form) for it to be visible and participate in the UI event loop.

You can "replicate" the object with code like:
thisform.AddObject( "oimage", x.Class )
n = amembers( laPEMs, ox, 0 )

for i = 1 to n
   if ( ! pemstatus( thisform.oImage, laPEMs[i], 1 ) and laPEMs[i] != "NAME" )
      store eval( "ox." + laPEMs[i]) to ("thisform.oImage." + laPEMs[i])
   endif
endfor
>AddObject() creates and adds an object to a form.
>Is there a way to add an existing object instance to a form
>
>eg
>x= createobject('image')
>do form myform
>
>where myform has a command button...
>*** myform.command1.click() ***
>thisform.addxobject('image1', x)
>thisform.image1.visible= .t.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform