- Configuring the menu in a Scheduler control
- Details of options
- "Print" option
- Customizing the setting window for printing the scheduler (available from version 170078)
- "Send by email" option
Automatic context menu for the Scheduler controls
Each Scheduler control found in a window proposes a menu to the user.
This menu, available without programming, includes several actions:
- Cancel or redo an action.
- Choosing the display mode of schedule: Day, Full week, Working week, Month.
- Displaying the elements for today.
- Managing the appointments: Addition, deletion, modification.
- Copying the appointment content.
- Printing the schedule.
- Sending the schedule by email.
The actions performed in the Scheduler control can be:
These actions mainly correspond to the move, resize, delete, ... of appointments.
- undone via "Undo" in the context menu or via Ctrl + Z.
- redone via "Redo" in the context menu or via Ctrl + Y.
: You can add options to this menu from the code. To do so, use the ContextMenu
Configuring the menu in a Scheduler control
The context menu of Scheduler control can be disabled. To configure the display of the context menu associated with the Scheduler control, you must:
- Open the Scheduler control description window.
- Select the "UI" tab.
- Choose the desired menu in the "Context menu" combo box. You can:
- "Display the AAF menu (System)": In this case, the automatic menu of Scheduler control will be displayed. For more details on how to configure this menu, see Configuring the AAF menu.
- "Add a context menu": If this option is checked, you can select the custom context menu to be displayed.
- If both options are checked, the custom context menu can be added before or after the AAF menu.
- If no option is selected, no context menu will be selected. The <Disabled> option will be displayed in the description window.
- The ContextMenu property is also used to remove the AAF-specific context menu and restore the standard Windows menu for a given control.
- Through programming, AAFDisable allows you to remove some options from the AAF context menu specific to Scheduler controls. Different constants can be used according to the option to disable:
- aafPrintSchedule: used to delete the option for printing the schedule. Caution, this constant can also delete the print option proposed by the Organizer controls.
- aafSendFileByEmail: used to delete the option for sending the schedule by email. Caution, this constant can also delete the email sending option proposed by the Organizer controls and by the Path edit controls.
The "Print" option is used to print the content of the Scheduler control. A specific window is displayed, allowing you to configure the print.
This window allows you to configure:
- the report orientation.
- the time braket per page: day, week, month, ...
- the period to print (set of dates).
Remark: Depending on the options specified for the pages' time bracket and the period, the printing of the scheduler may require more than one page. For example, a schedule printed on a daily basis over a week will print 1 page per day.
The "Print" button is used to start the print.
The content of Schedule control is viewed in the report viewer.
Regardless of the selected orientation, the content of the Schedule control is entirely printed between the specified bounds.
The print characteristics are as follows:
- The print title corresponds to the caption of Scheduler control. If no caption was specified for the Scheduler control, the report displays no title.
- The print respects the colors used in the Scheduler control.
- Today's date is printed at the bottom left.
- The number of the current page and the total number of pages are printed in the lower-right corner.
- The printed document takes into account the text direction specified with the TextDirection property in the window and/or in the Scheduler control.
- The print libraries of the WINDEV framework must be provided with the executable to use the "Print" option in the context menu of Scheduler controls.
- To disable the "Print" option in the context menu of the Scheduler control, use AAFDisable with the aafPrintSchedule constant.
- To customize the report associated with a specific Scheduler control, you must create a new Scheduler report based on this Scheduler control. It will be automatically associated with the Scheduler control and it will be printed via the "Print" option.
Customizing the setting window for printing the scheduler (available from version 170078)
WINDEV allows you to include the setting window for printing the scheduler used by the AAF in your application. You will have the ability to customize:
- the appearance of this window (modification of skin template for example)
- the languages supported by this window. This feature is very useful when translating this window into the different languages available in the application.
To include the window for configuring the print of the schedule in your application:
- On the "Project" tab, in the "Project" group, expand "Import" and select "WINDEV elements and their dependencies".
- Select the subdirectory that contains the elements to import. The print settings window is located in the "Programs\Data\Preset windows\AAF" subdirectory of the WINDEV setup directory.
- WINDEV lists the elements of the directory. This directory contains the different elements corresponding to the customizable AAFs. The window to import is named "WinDevAaf_ConfigPrintingSchedulerOrganizer.wdw".
- Validate. The window is included in the project and it can be modified. This custom window will be automatically taken into account when running the application.
- The window must not be renamed.
- If this window is included in your application, you may not benefit from the improvements made to this window during the different updates. Don't forget to check whether this window has evolved.
- Caution: To modify this window, the corresponding file must not be read-only. Modify the characteristics of the file in Windows if necessary.
- If you are using a scheduler control in your project, the Print AAF of the Scheduler control will also use this window.
"Send by email" option
The "Send by email" option is used to:
- print the content of the Scheduler control in a "Schedule.pdf" file.
- create a new message in the messaging software configured by default and attach the generated "Schedule.pdf" file to this message.
The procedure for printing the organizer in the PDF file is identical to the print procedure performed via the "Print the schedule" option (see the previous paragraph).
The generated Scheduler report is not viewed in the report viewer but it is directly printed in a file in PDF format.
- The print and PDF file generation libraries of the WINDEV framework must be provided with the executable to use the "Print" option in the context menu of Scheduler controls.
- To disable the "Send by email" option in the context menu of Scheduler controls, use AAFDisable with the aafSendFileByEmail constant. Caution, this constant can also delete the email sending option proposed by the Organizer controls and by the Path edit controls.