Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loop Thru Pageframe and change caption font size
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01333641
Message ID:
01334094
Views:
11
Thanks Borislav,

I do have a pageframe class and use this code in the activate and deactivate and one method to handle everything. Not as nice as yours but covers a few more areas:
Lparameters tcPageName, tcActivate, tcThemes

Local lcPageName, lcWithName, llActivate, llThemes
lcPageName = tcPageName
lcWithName = "thisform.pageframe1." + Alltrim(lcPageName)

* Activate or DeActivate this pageframe?
* parameter tcActivate is the True or False Control
* If we call it with TRUE then it is an ACTIVATE
llActivate = tcActivate


* 3rd Parameter is Themes control
* True means we want Themes
* False - NO Themes
If Pcount() >= 3
	llThemes = tcThemes
Else
	llThemes = .T.
Endif


* Form ACTIVATE CODE BELOW

If llActivate = .T.

	* With command Macro Substitution below
	With &lcWithName


		.FontBold=.T.
		.FontItalic=.F.
		.FontUnderline = .T.

		* make sure the fontsize is not too large!
		* now update the fontsize to be 1 larger
		.FontSize = thisform.original_pageframe_fontsize + 1
		
		*.FontName = "arial"


		* turn on themes
		Sys(2700,Iif(llThemes,1,0))

	Endwith


Else
	* Form DEACTIVATE CODE BELOW

	* With command Macro Substitution below
	With &lcWithName


		.FontBold=.F.
		.FontItalic=.F.
		.FontUnderline = .F.
		* restore original font size from init()
		.FontSize = thisform.original_pageframe_fontsize

		* turn off themes regardless of activate parameter
		Sys(2700,0)

	Endwith


Endif
I call this method from both the Activate and Deactivate with code like this:
* Call form method to take the place of all activates
* Method has parameters that are:
* 1) Page Frame Name which is the page name
* 2) True if Activate False if DeActivate
* 3) True if you want Themes Turned Off, False if you want NO Themes
Thisform.page_activate(This.Name,.T.,.T.)
Previous
Reply
Map
View

Click here to load this message in the networking platform