PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview of Gantt Chart control
  • Creating a Gantt Chart control
  • Characteristics of Gantt Chart control
  • Characteristics of Gantt chart
  • Other characteristics
  • A popup menu automatically proposed
  • Customize the task area
  • Mode for filling a Gantt Chart column
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview of Gantt Chart control
A Gantt chart allows you to graphically view the progress status of a project.
A Gantt chart is often used for project management or in production control to view the different project tasks as well as their organization over time.
The tasks are organized in row, the time units in column.
The dependency links between tasks are materialized by arrows that link the relevant tasks.
Creating a Gantt Chart control
WINDEV allows you to easily create a Gantt Chart control:
  • by creating a "Gantt Chart" Table or TreeView Table control.
  • by adding a "Gantt Chart" column into a Table or TreeView Table control.
To create a Table control containing a "Gantt Chart" column:
  1. On the "Creation" pane, in the "Graphic controls" group, expand "Time" and select "Gantt Chart".
  2. Click the position where the control will be created in the window. The control appears in creation mode.
  3. A Table control is created. This control contains:
    • a Text column,
    • a "Gantt Chart" column.
To create a TreeView Table control containing a "Gantt Chart" column:
  1. On the "Creation" pane, in the "Graphic controls" group, expand "Time" and select "TreeView Gantt Chart".
  2. Click the position where the control will be created in the window. The control appears in creation mode.
  3. A TreeView Table control is created. This control contains:
    • a Text column. This column is the hierarchy column.
    • a "Gantt Chart" column.
To add a "Gantt Chart" column into an existing Table or TreeView Table control:
  1. Display the description of the Table or TreeView Table control ("Description" from the popup menu).
  2. In the top section of description window of control:
    • Add a new column ("New").
    • Select the type of "Gantt Chart" column.
Characteristics of Gantt Chart control
A Gantt Chart control being an advanced control, a specific window is required to configure its characteristics.
To display the characteristics of a "Gantt Chart" column, you can:
  • Double-click the Gantt Chart column in the window editor.
  • In the description window of the Table or TreeView Table control, select the "Gantt Chart" column. In the "General" tab, all you have to do is click the "Options and styles for the Gantt Chart column" button.

Characteristics of Gantt chart

The parameters of the "Gantt Chart" column are as follows:
  • Number of days to display:
    • From the first task to the last one: By default, the display is performed from the first task to the last one, the width of a day being set to 80 pixels. An horizontal scrollbar is used to scroll the tasks if necessary.
    • According to the width of the column: This option is used to manage the advanced cases. For example:
      • displaying a very small period (less than 7 days). In this case, the division can be performed on an hourly basis.
      • displaying a long fixed period (more than 30 days). In this case, a button can be created to change the period displayed (GanttDateTimePosition).
  • Time display: Used to define:
    • the format of the date displayed.
    • whether the hours must be displayed or not, as well as their format.
    • 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:
    • the visible time period: Time period that will be displayed in the control.
    • the working time period: Time period for which a task can be defined in the Gantt chart. This time period can be modified:
  • Characteristics of a task:
    • Overlaying: Managing the task overlap. The tasks can be displayed side by side or they can be slightly shifted.
    • Granularity of a task: You have the ability to define:
      • the granularity when moving a task (1 hour by default).
      • the granularity for task duration, which means the minimum duration of a task (1 hour by default).
  • Allow the selection of periods: Allows the user to select a period with the mouse.
  • Allow the direct input of a task: Allows the user to add a task directly. To do so, click the Gantt Chart column to create the task and type its caption with the keyboard.
The edit options via the mouse are as follows:
  • Modifying the duration. You can allow (or not) the user to modify the duration of a task.
  • Move. You can allow (or not) the user to move a task.
  • Allow the overlapping by the user. If this option is checked, when moving tasks, the user will be able to make them overlap. In this case, the options defined for task overlap (offset or side by side) will be taken into account.
  • Re-organizing the other tasks after user modification. This option allows you to ask for an automatic re-organization of the tasks whenever a modification is performed by the user.
Most of these parameters can be modified by programming. See Properties associated with the Gantt Chart control for more details.
Other characteristics

A popup menu automatically proposed

A "GanttChart" column can display a specific popup menu proposing automatic features to the user. This menu is proposed by the AAF (Automatic Application Features).
As soon as at least one task is found in the Gantt Chart, this menu allows the user to:
  • Add, delete or modify a task.
  • Link the selected task to a prerequisite task.
  • Delete all the prerequisites from a task.
  • Print the content of the Gantt chart. This option is available only if a "Gantt Chart" report was created.

Customize the task area

In the "Gantt chart" column, the task is displayed in a specific area. This area is an internal window. You have the ability to translate and customize this area (color of the title, background image of the task, ...): all you have to do is include the internal window in the project and modify it.
To customize the display of the tasks:
  1. Display the description window of the Gantt Chart column.
  2. Select the internal window used for the tasks:
    • "None": the default display will be used.
    • "Preset window": a preset window is automatically added to the project. By default, this window is named "IW_WinDevViewGanttTask.wdw".
  3. The internal window is available in the project explorer. It can be modified in the window editor.
    Caution: this internal window can only be used to customize the drawing regarding the task display. Only the process for declaring the global variables is run. No other process is run. Therefore, you cannot add buttons with a specific click code.
Notes:
  • You also have the ability to use any internal window of your project.
  • The aspect of the tasks proposed by default can be configured in the "Style" tab of the description window of the control, in the "Task" element.
  • Tip: don't overload the internal window: if the Gantt chart contain several tasks, the rendering may become illegible or the display very slow.

Mode for filling a Gantt Chart column

A Gantt Chart column can be filled by programming via several processes and via the WLanguage functions.
Related Examples:
WD Gantt Complete examples (WINDEV): WD Gantt
[ + ] The "WD Gantt" example presents an advanced use of the Gantt Chart control.
This example is used to create a Gantt chart with tasks, links, cumulative tasks and milestones.
The tasks can be edited in a specific window.
The created chart can be saved in a file and reloaded thereafter.
The Gantt control Unit examples (WINDEV): The Gantt control
[ + ] Using a Gantt Chart control
Minimum required version
  • Version 19
Comments
Click [Add] to post a comment