This help page explains how to handle an Organizer control by programming. The example proposed in illustration is used to store the appointments in a HFSQL database.
In version 15, the appointments could be handled by the 日程表预约型 and 日程表重复型 variables. From version 16, we recommend that you use the 预约型 and 重复型 variables. These variables can also be used when handling a Scheduler control.
Adding an appointment
// Adds an appointment into the Organizer control日程表添加预约（ORG_MyOrganizer，"Sales meeting"，"201003220845"，..."201003221230"，"Sales"）
// Declares an 预约型 variableMyAppointment是预约型// Fills the appointmentMyAppointment..标题＝"Sales meeting"MyAppointment..内容＝"Meeting to discuss the weekly objectives."MyAppointment..开始日期＝"201003220845"MyAppointment..结束日期＝"201003221230"MyAppointment..类别＝"Sales"MyAppointment..ID＝1// Adds the appointment into the control日程表添加预约（ORG_Organizer，MyAppointment）
The ..背景颜色 property of the 预约型 variable is used to define a display color for an appointment. If no background color is defined, the Organizer control will automatically use the color associated with the category of the appointment.
Filling an Organizer control with the data found in a HFSQL data file
Retrieving a list of appointments
// Array containing a list of 预约型arrAppointmentList是预约型的数组型【0】// Lists of appointmentsarrAppointmentList＝日程表预约列表（ORG_MyOrganizer）
// List of appointments for January 2010arrAppointmentList是预约型的数组型【0】// Lists of appointmentsarrAppointmentList＝日程表预约列表（ORG_MyOrganizer，"20100101"，"20100131"）
// Selected appointmentarrAppointmentList是预约型的数组型【0】arrAppointmentList＝日程表预约列表（ORG_MyOrganizer，日程表.选定预约）
Displaying an Organizer control from a specific date
Deleting an appointment
Modifying the display of the control
Possibilities of the popup menu
In the relevant process, all you have to do is retrieve the appointment currently used and perform the corresponding process.
Example: To store in an APT data file an appointment added by the user via the popup menu, all you have to do is enter in the "Enter the appointment in input" process:
These procedures receive in parameter an 预约型 variable affected by the process.
Advanced use of processes with procedure
In the code, all you have to do is open the window in the "Enter the appointment in input" process. To lock the direct input via the popup menu of the organizer, the process must return 假.
This principle can be applied to all the processes called by the popup menu of the Organizer control.
To define the bank holidays displayed in the Organizer controls and in the Calendar controls, you must use 假日添加. This function allows you to define the list of bank holidays that will be used. This function allows you to customize the bank holidays according to the country and to the local regulations. This function must be used at the beginning of the application because it has a global effect on the application.
The bank holidays will be colored in green in the Organizer control.
To find out the entire list of WLanguage properties that can be used with an Organizer control, see Properties associated with the Organizer control.
J'accepte les termes de la licence
All you have to do is configure your product as follows: