- Configuring the automatic menu in a Gantt Chart control
- Printing a Gantt chart
Context menu of Gantt Chart controls (AAF)
Each Gantt Chart control in a window has a default menu that is available to users.
This menu, available without programming, proposes several actions:
- Modify the duration of a task,
- Delete tasks,
- Add tasks,
- Link tasks,
- Print the Gantt chart.
: You can add options to this menu from the code. To do so, use the PopupMenu
Configuring the automatic menu in a Gantt Chart control
The context menu of the Gantt Chart control can be disabled. To configure the display of the context menu associated with the Gantt Chart control, you must:
- Open the description window of the Table or TreeView Table control.
- Select the "Gantt chart" column.
- Select the "UI" tab.
- Choose the desired menu in the "Popup Menu" combo box. You can:
- "Display the menu of AAF (System)": In this case, the automatic menu of the Gantt Chart 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 PopupMenu property is also used to remove the AAF-specific context menu and restore the standard Windows menu for a given control.
- AAFDisable is used to remove some options programmatically from the context menu of the AAFs specific to the Gantt Chart controls. Different constants can be used according to the option to disable:
- aafGanttAddDependency: used to disable:
- the addition of a prerequisite task,
- the deletion of all previous tasks.
- aafGanttAddTask: used to disable the addition of a task.
- aafGanttEditTask: used to disable the edit of a task.
- aafGanttDeleteTask: used to disable the deletion of a task.
- aafPrintReportOnTable: used to disable the print of Gantt chart.
The "Print" option is used to print the content of Gantt Chart column.
The print characteristics are as follows:
- The print title corresponds to the caption of Table or TreeView control that displays the Gantt Chart control. If no caption was specified, the report displays no title.
- The print respects the color used in the Gantt Chart control.
- Today's date is printed in the upper-right corner.
- The number of the current page and the total number of pages are printed in the lower-right corner.
- The document is printed using the writing direction specified with the TextDirection property at window and / or Gantt Chart control level.
- The "Print" option in the context menu of Gantt Chart columns requires to provide the print libraries of the WINDEV framework with the executable.
- To disable the "Print" option in the context menu of Gantt Chart controls, use AAFDisable with the aafPrintReportOnTable constant.
- To customize the report associated with a specific Gantt Chart control, you must create a new Gantt Chart report based on this Gantt Chart control. This report will be automatically associated with the Gantt Chart control and it will be printed via the "Print" option. For more details, see Gantt Chart report.