Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Silly question
Message
 
À
20/03/2002 12:17:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00635062
Message ID:
00635141
Vues:
20
Hi Jonathan

I think you are looking for something like the code shown below. It is a simplistic approach that drills down through all the objects on a form storing them in an array property of the form. I have not tested this code, just something I picked up somewhere.

HTH

Robert
FOR I = 1 To This.ControlCount
    loObject = This.Controls[I]
    This.RegisterObject(loObject)  
ENDFOR    

**
**  Method on the form
**
RegisterObject
LPARAMETERS toObject

DO CASE
   CASE UPPER(toObject.BaseClass) = "PAGEFRAME" 
        LOCAL I
        FOR I = 1 TO toObject.PageCount
            This.RegisterObject(toObject.pages[I])
        ENDFOR 
   CASE UPPER(toObject.BaseClass) = "CONTAINER" 
        LOCAL I
        FOR I = 1 TO toObject.ControlCount
            This.RegisterObject(toObject.Controls[I])
        ENDFOR 
    OTHERWISE
        This.nCount = This.nCount + 1
        This.aControls[This.nCount] = toObject
ENDCASE
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform