Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pages on pageframe - did I lost my mind?
Message
 
 
À
29/05/2002 15:56:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00662676
Message ID:
00662749
Vues:
22
>Ok Nadya, I added the activate code to all 4 pages' activate event and modified it accordingly. I also put the click event code in all pages' click event and modified it accordingly. It works as it should. I emailed my example to you. All it shows is that there must be code someplace else that is interferring...other methods or the pageframe itself or the form?
>
Seems like I solved this problem. I had to put the following code in form's Refresh():
dodefault()
thisform.DisplayCorrectPage()
without dodefault() it didn't work correctly, e.g. textboxes still were empty.

Here is DisplayCorrectPage method:
********************************************************************
*  Description.......: DisplayCorrectPage
*  Calling Samples...:
*  Parameter List....:
*  Created by........: Nadya Nosonovsky 05/29/2002 02:48:13 PM
*  Modified by.......:
********************************************************************
lparameter tcSource
if vartype(m.tcSource)<>"C"
	tcSource = BldMstr.source
endif
*--------------------------------------------------------------------------
* -- updated:rmm:10/15/01
* --	enable/disable appropriate pages per source
* --	Make sure user is on correct page
*--------------------------------------------------------------------------
with thisform
	do case
	case m.tcSource = 'S'
		.RefreshPage(1)
        .RefreshPf1.ActivePage = 1
        
	case m.tcSource = 'M'
		.RefreshPage(2)
        .RefreshPf1.ActivePage = 2

	case m.tcSource = 'C'		
		.RefreshPage(3)
		.txtMiscType.visible = .t.
		.txtMiscType.valid() && To show correct credit page
        .RefreshPf1.ActivePage = 3
        
	otherwise
		.RefreshPage(4)
        .RefreshPf1.ActivePage = 4
	endcase

	if not empty(m.tcSource) && and this.value<>"C"
		store .t. to .cmdProceed.visible, ;
			.cmdRepeat.visible, ;
			.cmdCancel.visible
	endif
endwith
And here is RefreshPage method (I also modified Page.Activate and Page.Click methods to use RefreshPage method instead of prev. code):
********************************************************************
*  Description.......: DataEntry.RefreshPage
*  Calling Samples...: 
*  Parameter List....: tnPage
*  Created by........: Nadya Nosonovsky 05/29/2002 04:56:52 PM 
*  Modified by.......: 
********************************************************************
lparameter tnPage
if vartype(m.tnPage)<>"N"
   tnPage = 1
endif
&& Updated:NN: 05/29/02
for each oPage in thisform.refreshPf1.Pages
    if lower(oPage.name) = 'page'+transform(m.tnPage)
       oPage.fontbold = .t.
       oPage.enabled = .t.
    else
       oPage.fontbold = .f.
       oPage.enabled = .f.      
    endif
endfor
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