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
Title:
Prev Next page command button and disabled pages
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00956952
Message ID:
00956952
Views:
51
Hi all

I have put 2 command buttons on a pageframe, so that the user can click on it to go to the next or previous page

NextButton.Click()
DODEFAULT()

THISFORM.pgf.ACTIVEPAGE = IIF(THISFORM.pgf.ACTIVEPAGE = THISFORM.pgf.PAGECOUNT, ;
	1, THISFORM.pgf.ACTIVEPAGE + 1)

THISFORM.PrevNextCaption()
PrevButton.Click()
DODEFAULT()

THISFORM.pgf.ACTIVEPAGE = IIF(THISFORM.pgf.ACTIVEPAGE = 1, ;
	THISFORM.pgf.PAGECOUNT, THISFORM.pgf.ACTIVEPAGE - 1)

THISFORM.PrevNextCaption()
Form.PrevNextCaption()
IF TYPE("THISFORM.cmdPrevious.CAPTION") # "C"
	RETURN
ENDIF


THISFORM.cmdPrevious.CAPTION = "<< " + THISFORM.pgf.PAGES(IIF(THISFORM.pgf.ACTIVEPAGE = ;
	1, THISFORM.pgf.PAGECOUNT, THISFORM.pgf.ACTIVEPAGE - 1)).CAPTION

	
THISFORM.cmdNext.CAPTION     = THISFORM.pgf.PAGES(IIF(THISFORM.pgf.ACTIVEPAGE = ;
	THISFORM.pgf.PAGECOUNT, 1, THISFORM.pgf.ACTIVEPAGE + 1)).CAPTION + " >>"
This works okay till the next or the previous page is disabled for whatever reasons.

What kind of logic can be utilized for skipping such disabled pages?

Please advise.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Next
Reply
Map
View

Click here to load this message in the networking platform