Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This can not be done! I give up :(
Message
 
 
À
01/07/2005 10:49:05
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01027858
Message ID:
01028188
Vues:
15
>Nadya,
>
>I am not sure if this will help but here is the code I have. I have a property on all my forms "ldirtyflag" that I set when data needs to be saved. The Bindevent does the rest.
>
>
>DEFINE CLASS cpage AS page
>	lRefreshOnPageChange = .f.
>	name = "cpage"
>	*// backcolor = 16638920
>	PROCEDURE init()
>		DODEFAULT()
>		IF PEMSTATUS(thisform,"ldirtyflag",5)
>			BINDEVENT(thisform,"ldirtyflag",this,"setdatatosavestatus",1)
>		ENDIF 	
>	ENDPROC
>
>	PROCEDURE activate()
>		thisform.lockscreen = .f.
>		IF this.parent.nCurrentPage <> this.Parent.activepage
>			this.Parent.activatepage(this.Parent.activepage)
>			this.Refresh()
>		ENDIF
>		this.parent.ncurrentpage = this.Parent.activepage
>		DODEFAULT()
>	ENDPROC
>
>	PROCEDURE deactivate()
>		thisform.lockscreen = .t.
>		this.parent.pagechange(this.Parent.activepage)
>		IF PEMSTATUS(this.Parent,"nLastActivePage",5)
>			this.Parent.nLastActivePage = this.Parent.activepage
>		ENDIF
>		DODEFAULT()
>	ENDPROC
>
>	PROCEDURE setdatatosavestatus()
>		IF this.Parent.activepage <> this.pageorder
>			this.Enabled = not thisform.ldirtyflag
>		ENDIF
>	ENDPROC
>	
>ENDDEFINE
>
>
Very interesting! Thanks a lot for sharing.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform