Visual FoxPro Tips
 
Using SetAll
 
Suppose you have an entry form with several option groups. Each time a user enters a record, you want to reset the screen by initializing the options groups to no selection. One we to do this is to write a line of code for each options group like this:
 
Thisform.OptGrp1.VALUE = 0
Thisform.OptGrp2.VALUE = 0
etc.
 
However, there is a faster and a more efficient way to this:
 
thisform.setall("value", 0, "optionbutton")
 
You can use the SetAll method with other VFP objects and properties as needed. Type 'help setall' in the VFP command window for the details.
 
This tip is provided to you by Foxy Classes. For more Visual FoxPro tips, click here.
 
 
   
   
Send mail to webmaster@engineerica.com with questions or comments about this web site.
Copyright 2002-2003 Engineerica Systems, Inc.