Vince Teachout wrote:
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!
Well, Vince, first I'd like to chide you for not perservering a bit longer before yelling for help - you wanker!
Having said that, there are at least two ways that I came up with:

nCount = 0
FOR nI = 1 TO thisform.ControlCount
nCount = nCount + IIF(UPPER(thisform.controls[nI].baseclass) = "PAGEFRAME", 1, 0) endfor ? nCount

nCount = 0
FOR EACH oFoo IN thisform.Controls
   nCount = nCount + IIF(UPPER(ofoo.baseclass)="PAGEFRAME",1,0)
endfor ? ncount

Next time, RTFM, ok?

(any better suggestions welcome, btw)  Thanks.



_______________________________________________
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.

Reply via email to