Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prev Next page command button and disabled pages
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00956952
Message ID:
00956967
Views:
11
This message has been marked as the solution to the initial question of the thread.
Bhavbhuti

Why don't you make things easy for yourself, and for others to read? :-)

I haven't tested this but would something like the following work:

At the start, before any page selection clicking, Set
Thisform.nActPage = THISFORM.pgf.ACTIVEPAGE
NextButton.Click()
DODEFAULT()
With thisform
  .nLastPage = .pgf.PAGECOUNT
  .nNextPage = .nActPage + 1              & Nominally "active" page but not necessarily active
  If .nNextPage = .nLastPage
      .nNextPage = 1
  Endif
  If not .pgf.Pages( .nNextPage).Enabled  && If chosen page not enabled
      .nActPage = .nNextPage
      This.Click()                        && recursively call this method to try the next
  Else
      .pgf.ACTIVEPAGE = .nNextPage        && SUCCESS!!!
  Endif
EndWith
Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform