Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exception enabled text
Message
De
01/03/2006 14:47:07
 
 
À
01/03/2006 02:32:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01099405
Message ID:
01100572
Vues:
13
>ThisForm.SetAll("visible", !.t., "textbox" + "combo") OR
This would set the visible for all "textboxcombo" controls in the container. Unless you've defined one, there is no such control
>ThisForm.SetAll("visible", !.t., "textbox" AND "combo")
>
AND performs a logical (boolean) comparison. You are trying to perform a boolean operation on character arguements. This will result in a "Function arguement, type, or count is invalid" error.



From VFP8 help (it might have changed in VFP9)
Container.SetAll(cProperty, Value [, cClass])
Use the SetAll method to set a property for all, or a certain class of, controls in a Container

There is no option to have a list of controls.
>ThisForm.SetAll("visible", !.t., "textbox" , "combo")
gives an error about the number of arguements
>ThisForm.SetAll("visible", !.t., "textbox,combo")
does nothing since there is no "textboax,combo" control
>

You can either have ALL controls made invisible
>ThisForm.SetAll("visible", !.t.)
or use a separate line for each class of controls
ThisForm.SetAll("visible", !.t., "textbox") 
ThisForm.SetAll("visible", !.t., "combo")
I would also recommend using .F. for false rather than !.T. I think it's easier to read and understand, but that's a personal preference unrelated to your real questions here
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform