Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DateTime picker
Message
From
05/09/2018 15:37:11
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
05/09/2018 13:33:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Miscellaneous
Thread ID:
01661831
Message ID:
01661835
Views:
72
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform