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:
00614292
Views:
24
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
*--------------------------------------------------
>I have a pageframe class where I want to programmatically set the backcolor of the Active page to 1 color and all the inactive pages to another color. IN general this is quite easy. However, I am looking for a way to do this without having to drop all the pages and add my own page subclass that has the code in it. I have tried ActivePage_Assign method in the pageframe, but this does not fire when you click on the various pages. Putting it in the UIEnable of the pageframe does not fire either.
>
>Currently, I have a SETPAGE method in the pageframe class, and I just put This.Parent.SetPage() in each of the Page Activate methods. I would like to do something at the PageFrame level that truly traps when the activepage changes and fires my SetPage method.
>
>TIA!

...Y soy feliz, bien feliz, asi lo grito;
Mira, que el mundo sepa, que se sepa:
Soy feliz....                       

...And I'm happy, quite happy, so do I yell it;
Look, so the world knows it, so be known:
I'm happy...
 

Ismael Rivera "Oye cosita linda"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform