Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Currency textbox
Message
De
20/07/2001 07:31:19
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00532527
Message ID:
00533037
Vues:
15
This message has been marked as the solution to the initial question of the thread.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform