Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setall
Message
De
20/06/2005 16:19:06
 
 
À
20/06/2005 00:53:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Setall
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01024751
Message ID:
01024942
Vues:
25
One option:
CLOSE all
LOCAL lcnewvalue	&& line of code to add to the method
lcnewvalue = ''

*--Form with controls to modify in this example is testform.scx
*--This example modifies the interactivechange method of every combobox, textbox, editbox and listbox on form

MODIFY FORM c:\forms\testform NOWAIT

ASELOBJ(laform, 1)
loform = laform(1)
IF TYPE('loform.pageframe')<>"U" && our pageframes are always named pageframe, check for pageframe1, etc.
   FOR EACH lopage IN loform.PAGEFRAME.PAGES
      FOR EACH ocontrol IN lopage.CONTROLS
         IF ALLTRIM(UPPER(ocontrol.BASECLASS)) = "TEXTBOX" .or. ALLTRIM(UPPER(ocontrol.BASECLASS)) = "EDITBOX" ;
         	.or. ALLTRIM(UPPER(ocontrol.BASECLASS)) = "COMBOBOX" ;
         	.or. ALLTRIM(UPPER(oControl.BASECLASS)) = "LISTBOX"
         	lcnewvalue = oControl.ReadMethod('InteractiveChange')
         	lcnewvalue = "THISFORM.isupdated = .T."+CHR(13)+ALLTRIM(lcnewvalue)+CHR(13)
            ocontrol.WRITEMETHOD('InteractiveChange',lcnewvalue)
         ENDIF
      ENDFOR
   ENDFOR
ELSE	&& no pageframe all controls are on the single page
   FOR EACH ocontrol IN loform.CONTROLS
         IF ALLTRIM(UPPER(ocontrol.BASECLASS)) = "TEXTBOX" .or. ALLTRIM(UPPER(ocontrol.BASECLASS)) = "EDITBOX" ;
         	.or. ALLTRIM(UPPER(ocontrol.BASECLASS)) = "COMBOBOX" ;
         	.or. ALLTRIM(UPPER(oControl.BASECLASS)) = "LISTBOX"
         	lcnewvalue = oControl.ReadMethod('InteractiveChange')
         	lcnewvalue = "THISFORM.isupdated = .T."+CHR(13)+ALLTRIM(lcnewvalue)+CHR(13)
            ocontrol.WRITEMETHOD('InteractiveChange',lcnewvalue)
         ENDIF
   ENDFOR
ENDIF

RETURN
.·*´¨)
.·`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
Répondre
Fil
Voir

Click here to load this message in the networking platform