ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Gantt Chart functions
  • Properties specific to GanttTask variables
  • Using GanttTask variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
GanttTask (Variable type)
In french: TâcheGantt
The GanttTask type is used to define the advanced characteristics of a task for a Gantt chart. You can define and change the characteristics of this task using different WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
NouvelleTâche1 is GanttTask
NouvelleTâche1.ID = "ID1"
NouvelleTâche1.DurationInHour = 0.10
NouvelleTâche1.Title = "Ouverture de la trappe"

NouvelleTâche2 is GanttTask
NouvelleTâche2.ID = 2
NouvelleTâche2.DurationInHour = 2.5
NouvelleTâche2.Title = "Lancement de la fusée"

// Ajoute la première tâche
GanttAddTask(COL_Gantt, NouvelleTâche1)

// Ajoute la tâche au champ Table en créant une nouvelle ligne
TableAddLine(TABLE_Exemple, NouvelleTâche2)

// Réorganise les tâches dans la colonne de type Diagramme de Gantt
GanttOrganizeTask(COL_Gantt)
Properties

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 represents the global progress of several subordinate tasks.
  • Faux: 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 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 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.
  • Faux: 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 is set to an empty string ("").
Remarks

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: 09/20/2024

Send a report | Local help