Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Databinding
Message
 
 
À
27/03/2004 10:31:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00890154
Message ID:
00890258
Vues:
17
John,

You must have some code somewhere in your form or class hierarchy affecting things.

The form below works just as it should. If I type A the value in the first textbox chances to A1, press the tab key and the textbox value still shows A1 and focus ends up in the second textbox and the first row of the grid shows A1.
**************************************************
*-- Form:         form1 (c:\vfp8app\misc\jjones1.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   03/28/04 10:55:06 AM
*
DEFINE CLASS form1 AS form

	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"

	ADD OBJECT text1 AS textbox WITH ;
		ControlSource = "x1.c1", ;
		Height = 23, ;
		Left = 12, ;
		TabIndex = 1, ;
		Top = 16, ;
		Width = 100, ;
		Name = "Text1"

	ADD OBJECT grid1 AS grid WITH ;
		Height = 158, ;
		Left = 24, ;
		TabIndex = 3, ;
		Top = 65, ;
		Width = 320, ;
		Name = "Grid1"

	ADD OBJECT text2 AS textbox WITH ;
		ControlSource = "x1.c2", ;
		Height = 23, ;
		Left = 163, ;
		TabIndex = 2, ;
		Top = 22, ;
		Width = 100, ;
		Name = "Text2"

	PROCEDURE Load
		create cursor x1 ( c1 c(10), c2 c(10) )

		for i = 1 to 10
		   insert into x1 values ( transform( i ), transform( i ) )
		endfor

		go top
	ENDPROC

	PROCEDURE grid1.AfterRowColChange
		LPARAMETERS nColIndex

		thisform.Refresh()
	ENDPROC

ENDDEFINE
*
*-- EndDefine: form1
**************************************************
>But the problem is, what I key in is not visible in my textbox either.
>Ex.
>1. At this moment, my textbox display "ABC".
>2. I setfocus to textboxA, and key in character "Z". Textbox still show value "ABC" but cursor has move one position to right.
>3. I setfocus to other control. TextBox still show "ABC".
>4. I click/setfocus to grid, now only textboxdisplay "ZABC".
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform