- Control found in a window, page or report
- Creating a Scheduler control (window and page editor)
- Describing a scheduler (window and page editor)
- The control options (window editor and page editor)
- Context menu proposed automatically
- A deletable appointment
- Customize the appointment area
- Modes for filling a Scheduler control
Control found in a window, page or report
The Scheduler control is used to automatically display and handle schedules. It is used to manage the display of multiple resources and it is used in several applications or sites.
The display is performed:
- on a daily, weekly or montly basis,
- on 6 months or on 1 year.
The time period, the first day of the week and the number of days to display can be configured. These parameters can be easily defined in the control description window.
: Scheduler controls are also available in Scheduler reports. For more details on how schedulers work in reports, see Scheduler report
Creating a Scheduler control (window and page editor)
To create a Scheduler control
Remark: The dimensions of the control are optimized to take up the available space at the specified position. If the control size does not suit you, press Ctrl + Z: the control size will be reset to default.
- On the "Creation" tab, in the "Graphic controls" group, expand "Time" and select "Scheduler".
- Click where the control will be created in the window or page.
- The Scheduler control creation wizard starts. Answer the questions and validate.
- The control appears in the editor.
To view the characteristics of the control, select "Description" in the context menu.
Describing a scheduler (window and page editor)
The control options (window editor and page editor)
The Scheduler control can be customized in the editor via the description window ("Details" tab).
The parameters of the Scheduler control are as follows:
- With buttons to change the time range: This option is used to display buttons in order for the user to scroll the different periods of the schedule. These buttons are displayed at the top left of schedule.
This option is not available. Indeed, the change of period is performed via an horizontal swipe on the Scheduler control.
- Number of days to display: By default, the display is performed on a monthly basis but a schedule can also be displayed on a daily basis, on a weekly basis (on 5 or 7 days), according to the number of appointments or according to a specified number of days.
- Display: By default, the display is performed on a monthly basis with a granularity for move and duration set to one day. When clicking the display options, a window is opened, allowing you to define the different display options: It is possible to define the following elements:
- Total schedule range: day, week (5 or 7 days), according to the number of appointments, according to the number of days, 6 months, one year.
- Granularity of appointments: Corresponds the display precision of schedule. The appointments can start on a multiple of XX minutes, hours, ... and they can have a duration multiple of XX minutes, hours, ... The arrow button is used to enter preset values. The lock is used to link (or not) the values.
- Range viewed: The range viewed is calculated from the control size in the editor. By entering the range to view, you get the minimum dimension of the element according to the selected unit.
- When validating this window, the selected characteristics are summarized in the control description window.
- Resource display mode: By default, resources are displayed in rows.
They can also be displayed in columns.
- Time display: Used to define:
- the format of the date displayed for the "day" columns (or rows) of the scheduler.
- whether the time must be displayed or not in the control.
- the format of the time displayed for the "day" columns (or rows) of scheduler.
- whether the week number must be displayed or not, as well as its format. In the format, the '%1' string corresponds to the week number. Example of format: "Wk. %1".
- Time slot: Used to define:
To define specific time slots, use SchedulerWorkingHour and SchedulerWorkingHourResource.
- the visible time period: Time period that will be displayed in the control.
- the working time period: Time period for which an appointment can be defined.
- Appointments: Used to specify the characteristics of the appointments:
- Overlap: Appointment overlap options. The appointments can be displayed side by side or slightly shifted.
- Appointment granularity: Precision for displaying the schedule. By default, the granularity is set to 30 minutes.
You can define:
- the granularity regarding the move of an appointment.
- the granularity of the appointment duration, which means the minimum duration of an appointment. Caution: by default, this duration is set to 24 hours.
- Continuous display if several days: Used to display an appointment over several days as a single appointment. If this option is unchecked, the appointments on several days will correspond to as many appointments as the number of days.
- Other parameters:
- Allow time range selection: Allows the user to select a period with the mouse.
- Allow direct input of an appointment: Allows the user to add an appointment directly.
To do so, click the Scheduler control to create the appointment and enter its caption via the keyboard.
All you have to do is click in the Scheduler control. A "+" button appears in the selected area. The event "Before creating the appointment" is run when clicking "+". You can open a window to type the appointment characteristics. For more details, see Events associated with a Scheduler control.
- Display and allow the appointments for the entire day: Used to specify that an appointment can correspond to a whole day. In this case, a specific area is displayed in the Scheduler control. This area is used to enter the daily appointments.
You can specify the height of the area.
- if the schedule is displayed with the resources in rows:
- if the schedule is displayed with the resources in columns:
The edit options via the mouse are as follows:
- Change duration. You can allow (or not) the user to modify the appointment duration.
- Move. You can allow (or not) the user to move an appointment.
- Allow users to change resources. If this option is checked, when moving an appointment, the user will be able to associate it with a different resource.
- Allow users to overlap elements. If this option is checked, when moving appointments, the user will be able to make them overlap. In this case, the options defined for overlapping appointments (offset or side by side) will be taken into account.
The options regarding the dimension of areas are as follows:
- if the resources are displayed in rows:
- Minimum width of an hour. The width of the day is calculated according to the number of hours displayed.
- Minimum height of a resource.
- Width of the resource header.
- if the resources are displayed in columns:
- Minimum width of the resource.
- Time minimum height. The height of the day is calculated according to the number of hours displayed.
- Height of the break (for changing day)
- the resources are always displayed in rows. You have the ability to configure the following elements:
- Resource height.
- Width of the resource header.
Most of these parameters can be modified through programming. For more details, see Properties associated with the Scheduler control
Context menu proposed automatically
The Scheduler control can display a specific context menu with automatic features available to the user. This menu is proposed by the AAF (Automatic Application Features).
As soon as at least one resource is found in the schedule, this menu allows the user to:
- Modify the display mode of the scheduler: daily, weekly, monthly display or display of the current day only.
- Add, delete or modify an appointment when selecting a time period.
- Copy the content of an appointment.
- Print the contents of the Scheduler control.
A deletable appointment
The Scheduler control allows the user to delete the selected appointment via the red cross displayed in the upper-right corner of appointment.
When the user clicks this cross:
- the appointment is deleted from the Scheduler control.
- if the Scheduler control is linked to a data file or to a variable, the appointment is deleted from the data file.
Remark: If the control is linked to a variable or to a data file, you can prevent the deletion ("Allow the deletion (also deletes from the data source)" option in the "Content" tab of the control description window).
Customize the appointment area
In the Scheduler control, the appointment is displayed in a specific area. You have the ability to translate and customize this area: color of title, background color of the appointment, ...
To modify the aspect of the appointments proposed by default, you have the ability to modify the style options defined for this element.
- Open the Scheduler control description window.
- In the "Style" tab, select the "Appointments" element. You can:
- use a shadow,
- use a separator in dots between hours,
- define the title and background options:
- solid background,
- gradient background,
- Solid background, multiline title and bottom line. This option is used to display the title on several lines (especially if the appointment is not wide enough to display the entire title)).
- define the fonts used, ...
To fully customize the display of appointments (required for translation):
- Open the Scheduler control description window.
- In the "General" tab, select the internal window used for the appointments:
- "None": the default display will be used.
- "Preset window": If this option is selected, the WDAAF internal component is immediately added to the current project.
- The "IW_WinDevViewAPT" internal window is automatically associated with the "Internal window for the appointments" option.
- The "IW_WinDevMobileViewAPT" internal window is automatically associated with the "Internal window for the appointments" option.
- If the WDAAF component already exists, only the window is added to the component.
- This window is also used to customize appointments in Organizer controls.
- Any internal window in your project.
- If necessary, validate the control description window.
- The custom internal window is available in the "Project explorer" pane, in the "Internal components" folder. It can be modified in the window editor.
Caution: this internal window can only be used to customize the display of appointments. Only the "Global declarations" event is executed. No other events are executed. Therefore, you cannot add buttons with a specific click code.
- If you are using the suggested preset window, the style options of the appointment (selected in the "Style" tag) are applied.
Modes for filling a Scheduler control
Complete examples (WINDEV): WD Schedule
Unit examples (WEBDEV): The Scheduler control
Complete examples (WEBDEV): WW_Schedule
This page is also available for…