|
|
|
|
|
- Properties specific to GanttTask variables
- Using GanttTask variables
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. 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 name | Type used | Effect |
---|
Accountable | Character string | Accountable of the task. This information is not displayed in the Gantt chart. | BackgroundColor | Integer | Background color used to display the task in the Gantt Chart column. This color can correspond to: Before version 24, this property was named "BackgroundColor". | Cumulative | Boolean | Management 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.
| DurationInDay | Real, integer or numeric | Duration 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. | DurationInHour | Real, integer or numeric | Duration 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. | EndDate | Character string or DateTime variable | End 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. | ID | Character string | Number used to identify the task. This property must be specified. | Image | Image | Image 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.
| Milestone | Boolean | Management 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.
| Progress | Integer | Percentage of task progress (between 0 and 100). | ProgressColor | Integer | Color 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: | Row | Integer | Number of the row in the Table control where the task must be displayed. | StartDate | Character string or DateTime variable | Start 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. | Title | Character string | Task name. This name is displayed on the right of the task. | ToolTip | Character string | Text 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:
| | GanttAddTask | Adds a task in a Gantt Chart column in a Table or TreeView Table control. | GanttGetTask | Gets a task using its identifier in a Gantt Chart column in a Table or TreeView Table control. | GanttListTask | Returns: - 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:
|
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.
|
|
Unit examples (WINDEV): The Gantt control
[ + ] Using a Gantt Chart control
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|