Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verify each object contained in form even with class obj
Message
De
13/12/2006 13:51:33
 
 
À
13/12/2006 13:49:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01177307
Message ID:
01177325
Vues:
21
Step through each level. You may have to do your own based on something like:
CLOSE all
clear

MODIFY FORM c:\programns\frms\test1.scx NOWAIT

ASELOBJ(laform, 1)
loform = laform(1)
IF TYPE('loform.pageframe')<>"U"
   FOR EACH lopage IN loform.PAGEFRAME.PAGES
      FOR EACH ocontrol IN lopage.CONTROLS
			*--Change the height, width, and valid
*!*	         IF ALLTRIM(UPPER(ocontrol.BASECLASS)) = "TEXTBOX" .or. ALLTRIM(UPPER(ocontrol.BASECLASS)) = "EDITBOX" ;
*!*	         	.or. ALLTRIM(UPPER(ocontrol.BASECLASS)) = "COMBOBOX" ;
*!*	         	.or. ALLTRIM(UPPER(oControl.BASECLASS)) = "LISTBOX"
*!*	         	lcvalue = ''
*!*	         	lcvalue = oControl.ReadMethod('When')
*!*	         	lcvalue = "THISFORM.passedonce = .F."+CHR(13)+ALLTRIM(lcvalue)+CHR(13)
*!*	         	oControl.WRITEMETHOD('When',lcvalue)
*!*					lc1value = oControl.ReadMethod('InteractiveChange')
*!*	         	lc1value = "THISFORM.SAVED = .F."+CHR(13)+ALLTRIM(lc1value)
*!*	            ocontrol.WRITEMETHOD('InteractiveChange',lc1value)
*!*	         	lc1value = oControl.ReadMethod('InteractiveChange')
*!*	         	lc1value = "THISFORM.passedonce = .F."+CHR(13)+ALLTRIM(lc1value)+CHR(13)
*!*	            ocontrol.WRITEMETHOD('InteractiveChange',lc1value)
			IF ALLTRIM(UPPER(oControl.BaseClass)) = "LABEL"
				IF 'test' $ LOWER(oControl.Caption)
					myvalue = LOWER(oControl.Caption)
					myValue = STRTRAN(myvalue,'test','Method ')
					?myValue
					oControl.Caption = myvalue
					oControl.Left = oControl.Left - 5
				ENDIF
			ENDIF
         ENDIF
      ENDFOR
   ENDFOR
ELSE	&& no pageframe all controls are on the single page
   FOR EACH ocontrol IN loform.CONTROLS
		*--Change the height, width, and valid
*!*	         IF ALLTRIM(UPPER(ocontrol.BASECLASS)) = "TEXTBOX" .or. ALLTRIM(UPPER(ocontrol.BASECLASS)) = "EDITBOX" ;
*!*	         	.or. ALLTRIM(UPPER(ocontrol.BASECLASS)) = "COMBOBOX" ;
*!*	         	.or. ALLTRIM(UPPER(oControl.BASECLASS)) = "LISTBOX"
*!*	         	lc1value = oControl.ReadMethod('InteractiveChange')
*!*	         	lc1value = "IF TYPE('oncendo') = 'O' .and. !ISNULL(oncendo)"+CHR(13);
*!*	         	          +"    oncendo.saved = .F."+CHR(13);
*!*	         	          +"ENDIF"+CHR(13);
*!*	         	          +ALLTRIM(lc1value)+CHR(13)
*!*	            ocontrol.WRITEMETHOD('InteractiveChange',lc1value)
*!*	         	lc1value = oControl.ReadMethod('InteractiveChange')
*!*	         	lc1value = "THISFORM.passedonce = .F."+CHR(13)+ALLTRIM(lc1value)+CHR(13)
*!*	            ocontrol.WRITEMETHOD('InteractiveChange',lc1value)
			IF ALLTRIM(UPPER(oControl.BaseClass)) = "LABEL"
				IF 'test' $ LOWER(oControl.Caption)
					myvalue = LOWER(oControl.Caption)
					myValue = STRTRAN(myvalue,'test','Method ')
					?myValue
					oControl.Caption = myvalue
					oControl.Left = oControl.Left - 5
				ENDIF
			ENDIF
*         ENDIF
   ENDFOR
ENDIF
>thanks Tamar, but i need to access elements that are by example in second (2) page of pageframe contained on other pageframe.. do you know?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform