Iterate for each control on the form. Use the baseclass property of
the control to see if it's a pageframe. Example code (untested):
*Iterate through each control on the form
FOR EACH loControl IN THISFORM.Controls
IF UPPER(loControl.BaseClass) == "PAGEFRAME"
*Iterate through each page on the pageframe
FOR EACH loPage IN loControl.Pages
*Do whatever with each page
WAIT WINDOW loPage.Name
ENDFOR
ENDIF
ENDFOR
At 04:41 PM 7/12/2006, you wrote:
I'm playing around with FOR EACH, but not getting anywhere, and I'm
not sure I'm on the right track.
In VFP9, how can I programatically tell how may pageframes are in
the current form?
I have a class of forms that may have zero, 1 or theoretically more
page frames, each page frame will have a unique name, and I need to
return number of page frames so I can iterate through their
pages. The page iteration isn't the problem, getting the pageframe
and it's name is.
Thanks!
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.