Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DateTime picker
Message
De
05/09/2018 15:37:11
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
05/09/2018 13:33:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01661831
Message ID:
01661835
Vues:
73
Koen,

>>I am looking for a datetimepicker class

There's a few around, but many of them date from the pre-Metro or even pre-Aero era, so they tend to mimic the original ActiveX version with hand-drawn circle for today's date or use non-standard colors. More recently there's a quite nice Sweetpotato option, but it relies on a READ/CLEAR EVENTS to pause for the calendar, meaning it doesn't work so well in a normal app that already has its READ EVENTS.

I was attracted to the ctl32_datepicker class with its really modern-looking calendar and interface (uses a combobox so you get prevailing Windows appearance) but there's no way to edit the time portion. So I subclassed it, adding a txtTime but also an invisible txtControlsource for databinding. If date or time value is edited, update txtcontrolsource.value (if it changed) for databinding. Worth checking out the ctl32_datepicker to see if you like the look of it and it's pretty easy to subclass.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform