Load Calendar Activity
When the form is opened, after the Post Dialog Is Initialized form-level event, the Load Calendar Activity event fires for all calendar controls on the form. Inside this event, the application can use table I/O or business functions to read calendar data and add the activities to the calendar control for display. The system provides two system variable: SL_StartTime and SL_EndTime. These values define the time range that the calendar control displays. The application logic should fetch all calendar activities that fall between SL_StartTime and SL_EndTime. Both SL_StartTime and SL_EndTime are UTIME type variables.
The Load Calendar Activity event fires when the calendar control must display a time period so that the application has an opportunity to load the calendar activities in that time period and to display them on the calendar. For example, when a user navigates to a new day, week, or month, the Load Calendar Activity is triggered so that the application can load the activities for the new day, week, or month.
The calendar control provides activity caching. When a day, week, or month is revisited for the second time, the calendar control displays the cached activities for the day, week, or month unless the cache is cleared by the application logic. (One way to clear the calendar cache is to call the system function, Delete Calendar Activity, to delete all activities.)
Whenever you want to load the calendar with events that exist in a given time period, use this formula:
SELECT from where T2 >= S and T1 <= E
where
T2 is the activity end time,
S is the system variable, Slstart,
T1 is the activity start time, and
E is the system variable, Slend.