Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pageframe.ActivePage problem
Message
 
 
À
09/11/2018 02:12:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 10
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01663231
Message ID:
01663233
Vues:
58
J'aime (1)
>>I was trying to figure out what was wrong in the code and after quite a long time of debugging I found out that Pageframe.ActivePage does not return the actual Page ID, but the PageOrder of the active page. So I need to write a method to get the actual page ID based on the page order.
>>
>>I found this quite surprising and did not run into this, only after now having a pageframe where the pages are ordered differently. Has anybody seen this before, or could it be that I do something incorrect?
>
>You're right. Found out a while ago after I had to reorder a pageframe
>
>If all your pageframes are based on a subclass, I guess you could write code in the ActivePage assign and access

I think overriding ActivePage behavior is too dangerous, since it is being used elsewhere. So I write a method GetActivePage()
LOCAL loRetVal AS Page

LOCAL lnPageOrder
lnPageOrder = THIS.ActivePage

LOCAL loPage AS Page
FOR EACH loPage IN THIS.Pages
	IF loPage.PageOrder == m.lnPageOrder
		loRetVal = m.loPage
		EXIT
	ENDIF
ENDFOR

RETURN m.loRetVal
Christian Isberner
Software Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform