Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem: NODEFAULT on Lostfocus
Message
De
14/11/2003 06:03:55
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Problem: NODEFAULT on Lostfocus
Divers
Thread ID:
00849791
Message ID:
00849791
Vues:
69
Hi,

i try to uses NODEFAULT on textBox, but a problem occur,
when you do this, if you go out by the form, form.LostFocus and form.Deactivate not fired.

Because you cannot known when you are abandoning the form, NODEFAULT is little useful.

- Run this repro
- click on SCREEN ( you see message )
- click on form and set focus to "NO LOSTFOCUS" textbox
- click on SCREEN ( you see no message because form events not fired )
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form

	Caption = "Form1"
	Name = "FORM1"

	ADD OBJECT text2 AS textbox WITH ;
		Alignment = 3, ;
		Value = (DATE()), ;
		Height = 23, ;
		Left = 46, ;
		Top = 55, ;
		Width = 100, ;
		Name = "Text2"

	ADD OBJECT text1 AS textbox WITH ;
		Value = "NO LOSTFOCUS", ;
		Left = 44, ;
		Top = 17, ;
		Name = "Text1"

	PROCEDURE LostFocus
		WAIT WINDOW "form lostfocus"
	ENDPROC

	PROCEDURE Deactivate
		WAIT WINDOW "form deactivate"
	ENDPROC

	PROCEDURE text1.LostFocus
		NODEFAULT
	ENDPROC

ENDDEFINE
Fabio
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform