>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
Thanks, Marcia, that's finally worked. I know, what was my problem. I didn't realize, that textbox::gotfocus() was part of the code...
I created the class, as you described, and it works just fine.
If it's not broken, fix it until it is.
My Blog