Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resetting values to default
Message
De
16/02/2002 00:54:41
 
 
À
16/02/2002 00:06:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00621009
Message ID:
00621069
Vues:
13
OOooppss... just corrected = the NEXT was not in the correct spot...
METHOD ID: _baseform.CustomReset

	THISFORM.LockScreen = .T.
	lnObjects = AMEMBERS(laObjects, THIS, 2)
	* Look at each member object, but only process checkbox or comboboxes.
	FOR lnCount = 1 TO lnObjects
		loObject = EVALUATE('THIS.' + laObjects[lnCount])
		IF INLIST( UPPER(loObject.BaseClass), 'COMBOBOX', 'CHECKBOX')
			loObject.Value =IIF(UPPER(loObject.BaseClass)= 'COMBOBOX', "", ;
				IIF(UPPER(loObject.BaseClass)= 'CHECKBOX', 0, loObject.Value ))
		ENDIF INLIST( UPPER(loObject.BaseClass), 'COMBOBOX', 'CHECKBOX')
	NEXT lnCount
	THISFORM.LockScreen = .F.
>Hello Ian,
>
>Give this a try... create a form method called 'CustomReset'... I use this method a bit, especially when
>I only want certain things on a form reset... you can modify this and drill down to specific levels as needed, but you will see that for yourself...
>
>
>METHOD ID: _baseform.CustomReset
>
>	THISFORM.LockScreen = .T.
>	lnObjects = AMEMBERS(laObjects, THIS, 2)
>	* Look at each member object, but only process checkbox or comboboxes.
>	FOR lnCount = 1 TO lnObjects
>		loObject = EVALUATE('THIS.' + laObjects[lnCount])
>		IF INLIST( UPPER(loObject.BaseClass), 'COMBOBOX', 'CHECKBOX')
>			loObject.Value =IIF(UPPER(loObject.BaseClass)= 'COMBOBOX', "", ;
>				IIF(UPPER(loObject.BaseClass)= 'CHECKBOX', 0, loObject.Value ))
>		ENDIF INLIST( UPPER(loObject.BaseClass), 'COMBOBOX', 'CHECKBOX')
>		NEXT lnCount
>	THISFORM.LockScreen = .F.
>
>
>
>
>HTH
>
>Ric
>
>>I am looking for a way to reset the default values for check boxes and comboboxes on a page. The combo boxes have character values so if I try to call the setAll method of the page with .SetAll('value',0), it cannot handle the comboboxes.
>>
>>TIA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform