Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I add code to a class ?
Message
From
03/03/2004 10:17:33
 
 
To
03/03/2004 05:18:32
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00881982
Message ID:
00882707
Views:
15
themes is a property which belongs to VFP8, I haven't problems if I run this code under VFP8

Comunque, grazie dell'interessamento (ci sto uscendo matto !)

>try to disable themes and set activePage
>
>_screen.AddObject('Pgmenu','menu') && Menu is an empty pageframe,
>                           &&I also tried with the default pageframe class
>With _screen.pgmenu
>	.top = 0
>	.left = 0
>        .themes = .F.  && <======= !!!!
>	i = 1
>	Select 'wmenulevel' && is a table in which I store informations
>                            &&about the pages of menu I want to build	
>	Scan
>		i = i + 1
>		.addobject('pg'+Alltrim(Str(i-1)),'Mypage')
>		With .pages(i)
>			.caption = Alltrim(wmenulevel.menu)
>			Select 'moduli'  && it contains the voices of menu
>			j = 0
>			Scan for Idmenu = wmenulevel.idmenu
>				j = j + 1
>				.addobject('pls' + Alltrim(Str(j)),'pulsdin')
>				.controls(J).label1.caption = moduli.descri
>*				.controls(J).left = 15
>				.controls(J).top = 20 + (.controls(J).height * (J - 1))
>				.controls(J).tag = Iif(!Empty(moduli.applica),"do " + moduli.applica,'')
>				.controls(J).label1.init()
>				.controls(J).visible = .t.
>			EndScan
>				.addobject('plsend','pulsdin')
>				.plsend.label1.caption = '\<Uscita'
>				.plsend.visible = .t.
>				.plsend.tag = "clear events"
>				.plsend.backcolor=Rgb(64,168,196)
>		EndWith 	
>		Select 'wmenulevel'	
>	EndScan 	
>	.visible = .t.
>        .activePage = 1  &&& <===== !!!!
>	.settactrl() && it's a method build in the menu object
>                     &&I also tried to avoid this call
>EndWith
>Return
>
> Define Class 'mypage' as Page
>	forecolor = Rgb(0,0,64)
>	*
>*	Procedure Activate
>*		for i = 1 to this.controlcount
>*			this.controls(i).disattiva()
>*		endfor
>*	EndProc
>	*
>*	Procedure Mousemove
>*		LPARAMETERS nButton, nShift, nXCoord, nYCoord
>*		NoDefault
>*		this.activate()
>*		DoDefault(nButton, nShift, nXCoord, nYCoord)	
>*	EndProc
>	*
>EndDefine
>
>
>Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform