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:28:02
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00761777
Message ID:
00761794
Vues:
23
>>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.

>
>You can pass the Form reference ...
>
>
>
>oContainer = CREATEOBJECT("myCustom",Thisform)
>oContainer.Process()
>
>DEFINNE CLASS myContainer as Custom
>   PROCEDURE INIT
>   LPARAMETERS toForm
>      This.AddProperty("oFormReference",toForm)
>   ENDPROC
>   PROCEDURE Process
>       MESSAGEBOX(This.oFormReference.Caption)
>   ENDPROC
>ENDDEF
>
Hiya Esparta,

FYI: Here you assign the caption to the container; not assign the captio to the controls within the container.

Ric
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform