Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Control to enter duration
Message
De
25/05/2007 18:12:24
 
 
À
25/05/2007 18:04:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01228473
Message ID:
01228633
Vues:
13
This message has been marked as a message which has helped to the initial question of the thread.
>>Hi everybody,
>>
>>I have an integer field for duration. I assume that the duration is entered in minutes.
>>
>>User wants an ability to enter hours and minutes (I'm also wondering, what if it takes days?)
>>
>>Now, I assume I have to use two unbound textboxes (one for hours, one for minutes) and update my field manually.
>>
>>Do you have other ideas of handling this problem or some suggestions? I'm not sure I like using spinners.
>>
>>Thanks in advance.
>___________
>Nadya,
>
>One textbox will do
>
>It holds one integer
>
>Set
>- its value to 0
>- format to RL
>- Inputmask to 99:99
>
>- Valid event to
>
>if( (int(this.value/100) > 24) or ( mod(this.Value,100) > 59) )
>	wait window nowait '00:00 - 23:59'
>	return 0
>endif
>
>
>Easily 'upgraded' to hh:mm:ss ( 99:99:99 )

You need >23 unless you want to allow 24:00 (then you also need to check that the other portion is 0 only).
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform