Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date in textbox
Message
De
20/04/1998 08:27:53
 
 
À
20/04/1998 01:19:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00093234
Message ID:
00093348
Vues:
37
>>>In a textbox with controlsource=dbf.mydate and with set notify on if the input is wrong a 'invalid date' message appears in the right top corner of the screen: I want to show my message (in my language) in the center of the screen: I tryed with set message to CENTER to centre at least the message but it does not work… Any ideea? Thanx
>>
>>Francesco,
>>First, SET NOTIFY OFF, which eliminates the 'invalid date' message. Then, in the VALID method trap for a bad date and write your own routine. VFP will still trap the bad date, and not allow the user out of the text box, but you will be able to insert your own message.
>
>The VALID event is not fired if the date is invalid. Or is there any method to force it.
>
>Vlad

Good point, Vlad. With invalid dates, there is a problem in trying to trap them and control the UI part. The only sure cure I have ever come up with, and it's not an elegant one, is to capture the date in a Character textbox with a mask and then test on LostFocus. Another way is to forget date entry altogether and place calendar control access.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform