Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Know all controls on a form
Message
From
09/04/2007 11:04:26
 
 
To
09/04/2007 08:33:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01213395
Message ID:
01213447
Views:
17
How can I know all controls on a form .
FOR EACH loControl IN Thisform.Controls
  Thisform.FindControls( loControl )
ENDFOR
This code in FindControls method:
Lparameters toControl
Local loPage, loControl, loColumn, lnCol

With toControl
  Do Case
  Case Upper( .BaseClass ) = 'PAGEFRAME'
    For Each loPage In .Pages
      Thisform.FindControls( loPage )
    Endfor

  Case Inlist( Upper( .BaseClass ), 'PAGE', 'CONTAINER' )
    For Each loControl In .Controls
      Thisform.FindControls( loControl ) 
    Endfor

  Otherwise
    ? SYS( 1272, toControl )
  Endcase
Endwith
Previous
Reply
Map
View

Click here to load this message in the networking platform