Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Some Help About Numeric TextBox Class
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01114408
Message ID:
01114411
Views:
15
Try selectonentry=.t.
This will select all the textbox's content, so if you press any key, it the content will be replace for that key...

I hope this helps..



>Hi All,
>i need some help about numeric textbox class , it works and enough me but wantto also this
>when i gotfocus to the textbox and press some keys between 0-9 old value will be 0 and start and continiue new typed values
>i'tried some ways but was not succesfull
>
>here is my code below
>
>Any advice would be appreciated.
>
>TIA
>
>
>**************************************************
>*-- Class:        stb_txtnumber2 (c:\soykan\mysoftware\emin_elk\lib\soykan.vcx)
>*-- ParentClass:  textbox
>*-- BaseClass:    textbox
>*-- Time Stamp:   04/18/06 05:02:00 PM
>*
>DEFINE CLASS stb_txtnumber2 AS textbox
>
>
>	Alignment = 1
>	Value = 0
>	Height = 23
>	InputMask = "999,999,999.99"
>	Width = 100
>	Name = "stb_txtnumber2"
>
>
>	PROCEDURE KeyPress
>		Lparameters nKeyCode, nShiftAltCtrl
>		Do Case
>		Case nKeyCode=7   && del
>			This.Value = 0
>			This.Refresh
>		Case nKeyCode >= 48 And nKeyCode <= 57
>		* Digits 0 to 9
>		* need something to here
>		Endcase
>	ENDPROC
>
>
>	PROCEDURE LostFocus
>		This.BackColor= 16777215
>	ENDPROC
>
>
>	PROCEDURE GotFocus
>		With This
>			.Tag=Transform(.Value)
>			.BackColor= Rgb(255,255,192)
>			.Refresh
>		Endwith
>	ENDPROC
>
>
>	PROCEDURE InteractiveChange
>		_vfp.ActiveForm.changed = .t.
>		_vfp.ActiveForm.addmode = .t.
>		_vfp.ActiveForm.editmode = .t.
>		this.BackColor= 8421631
>	ENDPROC
>
>
>ENDDEFINE
>*
>*-- EndDefine: stb_txtnumber2
>**************************************************
>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform