Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check to Know if there is a Grid on a form
Message
 
 
À
07/12/2005 06:05:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01075610
Message ID:
01075694
Vues:
18
>>HI BORISLAV ,
>>
>>How can I know if there is a control Grid on a form or not ?
>>
>>Best regards
>
>
>** Somwhere in your form
>IF thisform.CheckForGrid(this)
>   MessageBox("There is a grid")
>ENDIF
>
>
>*** Method CheckForGrid
>LPARAMETERS loObject
>LPARAMETERS lnFor
>DO CASE
>   CASE UPPER(loObject.BaseClass) $ [FORM PAGE CONTAINER]
>        FOR m.lnFor = 1 TO loObject.ControlCount
>            IF thisform.CheckForGrid(loObject)
>               RETURN .t.
>            ENDIF
>        NEXT
>ENDCASE
>RETURN (UPPER(loObject.BaseClass) == "GRID")
>
>Something like that, but not tested at all

Definitely not tested since it has two lparameters statements. Just kidding <g>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform