Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange behavior of the textbox with the amount
Message
 
 
To
19/01/2006 12:34:03
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01088067
Message ID:
01088542
Views:
22
>>>There is certainly a bug from some part.
>>>I think you owes
>>>- or to fill Controlsource
>>>- or to put R in Format
>>>- or to bring here a repro
>>
>>
>>**************************************************
>>*-- Form:         form1 (c:\mmviscollect\dd.scx)
>>*-- ParentClass:  form
>>*-- BaseClass:    form
>>*-- Time Stamp:   01/19/06 11:21:02 AM
>>*
>>DEFINE CLASS form1 AS form
>>
>>
>>	DoCreate = .T.
>>	Caption = "Form1"
>>	Name = "Form1"
>>
>>
>>	ADD OBJECT text1 AS textbox WITH ;
>>		Alignment = 3, ;
>>		Value = 0, ;
>>		Height = 23, ;
>>		InputMask = "9999.99", ;
>>		Left = 36, ;
>>		Top = 48, ;
>>		Width = 100, ;
>>		Name = "Text1"
>>
>>
>>	ADD OBJECT text2 AS textbox WITH ;
>>		Height = 23, ;
>>		Left = 72, ;
>>		Top = 120, ;
>>		Width = 100, ;
>>		Name = "Text2"
>>
>>
>>ENDDEFINE
>>*
>>*-- EndDefine: form1
>>**************************************************
>>
>>
>>Go to the first textbox, type some number. Go to the second, type anything. Click inside the first textbox, then click Enter. Watch how digit will disappear.
>
>this repro with a workaround. bound it not fix the issue!
>
>CREATE CURSOR NAOMI (FIELDN N(10,3))
>APPEND BLANK
>REPLACE FIELDN WITH +12345.610
>
>=CREATEOBJECT("form1")
>
>DEFINE CLASS form1 AS form
>	
>	ADD OBJECT text1 AS textbox WITH ;
>		Value = 0, ;
>		Left = 36, ;
>		Top = 48,	;
>		Controlsource = "naomi.fieldn"
>
>	PROCEDURE init
>		ADDPROPERTY(this,"this",this)
>		this.show
>		DOEVENTS
>
>		this.text1.simulate
>	
>	PROCEDURE text1.simulate
>		thisform.Caption = "Look simulation"
>
>		textbox::keypress(32,0)	&& KEYBOARD '{spacebar}' PLAIN CLEAR
>		thisform.Caption = "look 5 is disappeared"
>		CLEAR TYPEAHEAD
>		CHRSAW(5)
>		WAIT windows ""  TIMEOUT 3
>
>		textbox::keypress(27,0)	&& KEYBOARD '{ESC}' PLAIN CLEAR
>		thisform.Caption = "look 5 appear"
>		CLEAR TYPEAHEAD
>		CHRSAW(5)
>
>		
>		FOR k=1 TO 5
>			textbox::keypress(4,0)	&& KEYBOARD '{RIGHTARROW}*5' PLAIN CLEAR
>		NEXT
>		thisform.Caption = "look caret position"
>		CLEAR TYPEAHEAD
>		CHRSAW(5)
>		
>		textbox::keypress(ASC('9'),0)
>		thisform.Caption = "look new value"
>		CLEAR TYPEAHEAD
>		CHRSAW(5)
>		
>		thisform.Caption = "Now press ENTER !"
>
>* workaround
>*	PROCEDURE text1.keypress(a,b)
>*		IF b=0 AND a=13 && ENTER
>*			this.selstart = 256
>*		ENDIF
>ENDDEFINE
>
Hmm. So, just no playing with the keyboard for numeric fields? <g>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform