* reset.prg 13-Jul-97 * Usage: select object(s) to be ResetToDefault * in the command window enter reset() * Copyright 1997, DF Software Development, Inc. local i, j, n, m, laObjects[1] n = aselobj( laObjects ) && all selected objects if ( n = 0 ) * nothing to do wait window "Select one or more controls to ResetToDefault" nowait return endif local j, m, lcClass, luObjectValue, luClassValue for i = 1 to n m = amembers( laMembers, laObjects[i] ) lcClass = laObjects[i].Class for j = 1 to m if ( pemstatus( laObjects[i], laMembers[j], 0 ) and ; ! pemstatus( laObjects[i], laMembers[j], 1 ) ) * property is overridden and not read only, now check to see * if it's the same as the default * NOTE: we have to pull these values out to a memvar, * getpem() inside an IF fails miserably. luObjectValue = getpem( laObjects[i], laMembers[j] ) luClassValue = getpem( lcClass, laMembers[j] ) if ( luObjectValue == luClassValue ) * same as class, so reset it laObjects[i].ResetToDefault( laMembers[j] ) endif endif endfor endfor