>Hi Nadya.
>
>>> BTW, I found another problem. When I delete the whole content of the textbox and start typing again, I see , , in the textbox. Also comma doesn't appear on the right position while typing. Everything becomes normal, when I leave textbox, but it just doesn't seem right while typing. Is it possible to change this behavior? It's not a big problem and I guess, I can live with it, but if it could be fixed, it would be great. <<
>
>This is the quick solution: Creat a numeric textbox class and add a property
>to it called cOldInputMask.
>
>This code in the GotFocus()
>
>
>WITH This
> *** Save the original input mask
> .cOldInputMask = .InputMask
> *** Remove separators from input mask
> .InputMask = STRTRAN( .cOldInputMask, ',', '' )
> *** Perform The parent class behavior
> *** Which in MY class library is the
> *** business that sets .SelStart and .SelLength
> DODEFAULT()
>ENDWITH
>
>
>This in the LostFocus()
>
>
>This.InputMask = This.cOldInputMask
>
>
>I have another numeric text box that is the ultimate numeric text box from Chapter 4 of "1001 Things You Wanted to Know About VFP" that does caluculator style entry, but that is too much code to post here < s >.
>
>>> BTW, instead of nodefault it should be dodefault() in your code sample. Otherwise it doesn't work. <<
>
>We have already been around the block on this issue. It works for me. I do not know why it doesn't work for you. You must have code that I do not have somewhere up your class hierarchy.
>
>
>Marcia
Marcia,
Thanks again for your reply. I'll try again. The class doesn't have any code. We have wgtextbox, which is subclass of VFP base class with only one difference: SelectOnEntry set to true. I created a range class (two labels, two textboxes). I added validate method to container and call it from each textbox.valid method. Nothing more.
If it's not broken, fix it until it is.
My Blog