Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pages in a Pageframe
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00614217
Message ID:
00614325
Views:
20
Beware of the way you do this because the problem I had was that the PageFrame CLICK does not fire if the user navigates from page to page using the left and right arrow keys.

>Mark,
>In my pageframe class I have an "OnPageChange" method that is called from its Click event, it uses a "nLastPage" custom property and works very well, changing colors can be added easily.
>
>
>
>*--------------------------------------------------
>*-- Create nLastPage property at pageframe class level and initialize it with 0
>
>*--------------------------------------------------
>*-- Pageframe Click event
>this.OnPageChange()
>
>*--------------------------------------------------
>*-- OnPageChange method
>with this
>LOCAL lnActivePage
>lnActivePage = .ActivePage
>if lnActivePage # .nLastpage
>	* a new page was clicked/chosen
>	* lock screen
>	thisform.lockscreen = .t.
>	* set last page font to normal
>	.pages(.nLastPage).fontbold = .f.
>	* set actual page font to bold	
>	.pages(lnActivePage).fontbold = .t.
>	* refresh active page
>	.pages(lnActivePage).refresh()
>	* store active page as last page
>	.nLastpage = lnActivePage
>	* unlock screen
>	thisform.lockscreen = .f.
>endif	
>endwith
>*--------------------------------------------------
>
>
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform