Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TextBox not selected on entry
Message
De
27/07/2001 13:32:02
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00535697
Message ID:
00536547
Vues:
8
This message has been marked as a message which has helped to the initial question of the thread.
Fabio-

>I think I missed some information: My problem is occuring on textboxes that store numeric values. When the value of the textbox is not empty, it is selected on entry. When the value is zero (0.00) and the user enters it using the TAB key, the control is not selected and the cursor stays located somewhere in the textbox area that isn't the beginning of it (fist position as usual). This behaviour causes that when my user types a number, let's say "1", the value assumed be "10". If he types "10" the value turns to "100" and so on...

Is the value of the bound field (I'm making an assumption) .NULL.? I can duplicate this behavior (sort of) if the field is .NULL. and not 0.0.
PUBLIC oform1

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


	**************************************************
*-- Form:         form1 (c:\nec\temp.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   07/27/01 10:26:09 AM
*
DEFINE CLASS form1 AS form


	Top = 0
	Left = 0
	Height = 295
	Width = 416
	DoCreate = .T.
	Caption = "Form1"
	Visible = .T.
	Name = "Form1"


	ADD OBJECT text1 AS textbox WITH ;
		ControlSource = "foo.n1", ;
		Format = "KZ", ;
		Height = 23, ;
		InputMask = "999.99", ;
		Left = 148, ;
		SelectOnEntry = .T., ;
		Top = 101, ;
		Width = 100, ;
		Name = "Text1"


	ADD OBJECT text2 AS textbox WITH ;
		ControlSource = "foo.n1", ;
		Format = "KZ", ;
		Height = 23, ;
		InputMask = "999.99", ;
		Left = 148, ;
		Top = 133, ;
		Width = 100, ;
		Name = "Text2"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 167, ;
		Left = 148, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Command1", ;
		Name = "Command1"


	PROCEDURE Load
		CREATE CURSOR foo (n1 n(6,2))
		INSERT INTO foo (n1) VALUES (1.1)
		INSERT INTO foo (n1) VALUES (0.0)
		APPEND BLANK IN foo
		GO top
	ENDPROC


	PROCEDURE command1.Click
		SKIP 1 IN foo
		IF EOF('foo')
			GO TOP IN foo
		ENDIF 
		THISFORM.REFRESH
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform