>We'd like to use comboboxes similar to Outlook in a VFP 6.0 app, for the entry of time values. When I say 'similar to Outlook', I mean the following behaviors:
>
Preset list of times (every half hour or so)
>User can type in the desired time if it's not displayed. Formatting is updated when they leave the field
>When the start time is changed, the end time changes accordingly
>When the start time is changed, the rowsource for the end time combobox is modified to exclude times earlier than listed in the start time combobox
>If the user wants to change the length of the appointment, they do so by simply changing the end time (via typing or selection), which does not affect the start time.
>We would like to store the time as a string in the format 'HH:MM AM'
>Ideally, we want an all-VFP solution>
>Has anyone done this before? Any pointers or gotchas on doing it?
>Thanks!
>zahid
Zahid,
We've done it.
-Start at 0, increment 30*60 secs, end at 24.
-Add seconds to dtot(date()) and get ttoc(,2) for time portion -ttoc(dtot(date()),2)-
-This fills combos initially (30 mins inc).
-Overlay combo and FoxyClasses TimePick control to accept nonexistant valid time
(Instead of timepick you could develop your solution say via keypress checking)
-In lostfocus of first reset and refill second if needed
Cetin