Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unexpected Results Display With Input Mask
Message
De
01/10/2004 09:48:11
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
30/09/2004 13:25:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00947608
Message ID:
00947917
Vues:
19
This message has been marked as a message which has helped to the initial question of the thread.
>When typing a new value, such as 1, into a blank text box that has an input mask like 9,999,999, an extra zero is added and the value becomes 10 instead 1. The extra zero only appears if I press TAB. When I press ENTER no extra zero appears.
>
>I have been searching at MS KB and I found that message number 191503 is related with my problem. The MS KB says this problem occurs only with VFP 5x. I am using VFP 8 and the problems is similar.
>
>Was not the problem solved? Is there a another way to workaround than MS KB indicate?

My solution for the problem was to remove the commas from .InputMask in textbox.gotfocus(), and restore it in .lostfocus(). I have added a .SavePicture property for that. It was back then in VFP5, and I actually kept it since - but then, it's a part of a framework which is not in use anymore, so I can't really say whether it solves the problem in VFP8, or whether the problem is still there at all. May work for you. Here's the code:
PROCEDURE GotFocus
	With This
		If "9,9" $ this.inputmask
		   .SavePicture=.InputMask
		   .selectonentry=.t.
		   .InputMask=Chrt(.InputMask, ",", "")
		   .refresh
		endif
	EndWith
ENDPROC


PROCEDURE LostFocus
	With This
		If !empty(.SavePicture)
		   .InputMask=.SavePicture
		   .savepicture=""
		   .refresh
		endif
	EndWith
ENDPROC

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform