Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing the forms caption to the class object(container)
Message
De
05/03/2003 16:13:54
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00761777
Message ID:
00761784
Vues:
27
Rajender,

The term "THISFORM" will not be valid until after THISFORM.init is completed. Remove any class reference property containing 'THISFORM', and replace with a generic class property definition, like "UNASSIGNED". Because you want the class property to be assigned by the current form (THISFORM), the current form should do the assigning. What you should do in the init of your form is this:
*--myNewForm.Init

*-- For demo purposes, I will assume only your textbox objects have the property 'strcaption'
DODEFAULT()
lnObjects = AMEMBERS(laObjects, THIS, 2)
FOR lnCount = 1 TO lnObjects
 *-- Look at each member, but only look certain ones
 loObject = EVALUATE('THIS.' + laObjects[lnCount])
 IF UPPER(loObject.BaseClass) = 'TEXTBOX'
   loObject.strcaption = THIS.Caption
 ENDIF
NEXT
HTH

Ric

>I have a class object in the container (usercntl).
>
>i need to send the form name to the class objects usercntl - init event.
>
>when i am using strcaption = thisform.caption it is saying this form does'nt exist.
>
>how to get the forms caption in the usercntl class object.
>
>Thank you.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform