ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Gantt Chart functions
  • Properties specific to GanttTask variables
  • Using GanttTask variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
GanttTask (Type of variable)
In french: TâcheGantt
The GanttTask type is used to define the advanced characteristics of a task for a Gantt chart. The characteristics of this task can be defined and changed using different WLanguage properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
NewTask1 is GanttTask
NewTask1.ID = "ID1"
NewTask1.DurationInHour = 0.10
NewTask1.Title = "Opening the trap"
 
NewTask2 is GanttTask
NewTask2.ID = 2
NewTask2.DurationInHour = 2.5
NewTask2.Title = "Launching the rocket"
 
// Adds the first task
GanttAddTask(COL_Gantt, NewTask1)
 
// Adds the task to the Table control by creating a new row
TableAddLine(TABLE_Example, NewTask2)
 
// Reorganizes the tasks in a Gantt Chart column
GanttOrganizeTask(COL_Gantt)
Remarks

Properties specific to GanttTask variables

The following properties can be used to handle a task found in a Gantt chart:
Property nameType usedEffect
AccountableCharacter stringAccountable of the task. This information is not displayed in the Gantt chart.
BackgroundColorIntegerBackground color used to display the task in the Gantt Chart column.
This color can correspond to:
Before version 24, this property was named "BackgroundColor".
CumulativeBooleanManagement of cumulative tasks:
  • True: the task is cumulative. The task includes an "arrow" marker at the beginning and at the end. This type of task is used to symbolize the global progress of several subordinate tasks.
  • False: the task is not cumulative.
DurationInDayReal, integer or numericDuration of the task expressed in working days. In this case, the end date (EndDate property) is calculated taking into account the working days.
A duration must necessarily be specified.
If the DurationInDay property is specified, the DurationInHour property must not be specified.
DurationInHourReal, integer or numericDuration of the task expressed in working hours. In this case, the end date (EndDate property) is calculated taking into account the working hours.
A duration must necessarily be specified.
If the DurationInHour property is specified, the DurationInDay property must not be specified.
EndDateCharacter string or DateTime variableEnd date and time of the task.
This property is read-only. It is automatically calculated by taking into account the specified duration (in days or in hours), the working days and the working hours.
For example, if a task lasts 24 hours and if the working hours are defined from 8:00 to 20:00, the duration of the task will be set to 2 days in the Gantt Chart.
IDCharacter stringNumber used to identify the task.
This property must be specified.
ImageImageImage displayed in the task (if the task uses the custom internal window, IW_WinDevViewGanttTask). This property can correspond to:
  • the path to an image accessible from the current computer,
  • an image file found in the application library,
  • an Image control containing an image,
  • a drawing performed in an Image control with the drawing functions and saved in memory.
MilestoneBooleanManagement of Milestone tasks:
  • True: the task is a Milestone task. A milestone task is a tag used to symbolize an important event, an intermediate deadline. A milestone task is represented by a diamond, and it has no duration and no progress.
  • False: the task is not a Milestone task.
ProgressIntegerPercentage of task progress (between 0 and 100).
ProgressColorIntegerColor used to fill the progression bar of the task. This property is taken into account only if the value of the Progress property is not 0.
This color can correspond to:
RowIntegerNumber of the row in the Table control where the task must be displayed.
StartDateCharacter string or DateTime variableStart date and time of the task.
If this property is not specified, the start date of the task corresponds to the system data and time.
TitleCharacter stringTask name. This name is displayed on the right of the task.
ToolTipCharacter stringText of the tooltip displayed on the task.
By default, this property corresponds to an empty string ("").

Using GanttTask variables

The GanttTask variables are used by the following functions:
GanttAddTaskAdds a task in a Gantt Chart column in a Table or TreeView Table control.
GanttGetTaskGets a task using its identifier in a Gantt Chart column in a Table or TreeView Table control.
GanttListTaskReturns:
  • the list of tasks between two given dates in a Gantt Chart column,
  • all the tasks in a Gantt Chart column,
  • a specific task (selected or hovered).
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 version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/23/2023

Send a report | Local help