Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I'm being visited by ghosts
Message
 
À
17/08/2001 08:34:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00545075
Message ID:
00546057
Vues:
13
>>
>>I've seen that when I had a Setfocus() on a given control in code. When I removed it, all went fine.
>>
>>José
>
>
>Can you expand on that a bit?

Craig,

In Codebook we have a method that runs on every business object called SetFocusToFirst(). See code hereunder.

My observation is that I will have ghosts images with some forms if I let SetFocusToFirst() run on the business object of the first page o a pageframe.

Simply putting NODEFAULT cures the problem.
SetFocusToFirst()
LOCAL lnControl, ;
	llRetVal, ;
	lnTabIndex

*-- Sets focus to first control that is not disabled
FOR lnTabIndex = 1 TO This.ControlCount
	FOR lnControl = 1 TO This.ControlCount
		*** EGL: 3/27/97 - Added checking for the existence of a SetFocus() method
		**			IF TYPE("This.Controls(lnControl).TabIndex") <> "U"
		IF TYPE("This.Controls(lnControl).TabIndex") <> "U" AND ;
				PEMSTATUS(This.Controls(lnControl), "SetFocus", 5)
			IF This.Controls(lnControl).TabIndex = lnTabIndex AND ;
					This.Controls(lnControl).Enabled
				This.Controls(lnControl).SetFocus()
				llRetVal = .T.
				EXIT
			ENDIF
		ENDIF
	ENDFOR
	IF llRetVal
		EXIT
	ENDIF
ENDFOR

RETURN llRetVal
José
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform