Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Event syntax
Message
From
02/02/2005 13:52:47
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00983157
Message ID:
00983161
Views:
16
Here is how I do it:
*--Form in this example is testform.scx
MODIFY FORM testform NOWAIT

ASELOBJ(laform, 1)
loform = laform(1)
*--See if controls are on a page on a pageframe named "pageframe"
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"
            ocontrol.HEIGHT = 25
            ocontrol.WIDTH = 64
            lc_addline = "*--Valid Method"+CHR(13)
            lc_value = ocontrol.READMETHOD('Valid')
            ocontrol.WRITEMETHOD('Valid',lc_addline+lc_value+CHR(13))
         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"
         ocontrol.HEIGHT = 25
         ocontrol.WIDTH = 64
         lc_addline = "*--Valid Method"+CHR(13)
         lc_value = ocontrol.READMETHOD('Valid')
         ocontrol.WRITEMETHOD('Valid',lc_addline+lc_value+CHR(13))
      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"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform