type is used to define the advanced characteristics of a link between two tasks of a Gantt chart. The characteristics of this link can be defined and changed using different WLanguage properties.
: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable
// Retrieve all the links that point to "ID1"
arrLink is array of GanttLink
arrLink = GanttListLink(COL_Gantt, "ID1")
Link is GanttLink
FOR EACH Link OF arrLink
Trace("Linked to " + Link.SourceID)
Properties specific to GanttLink variables
The following properties can be used to handle a link between two Gantt tasks:
|Property name||Type used||Effect|
|DestinationID||Character string||Identifier of the destination task. This identifier corresponds to the ID property defined in the GanttTask variable.|
|SourceID||Character string||Identifier of the source task. This identifier corresponds to the ID property defined in the GanttTask variable.|
|Type||Integer constant||Type of link. The available types of links are as follows: |
- gltStartToStart: "Start to Start" link: The destination task cannot start as long as the source task is not started.
- gltStartToEnd: "Start to End" link: The destination task cannot end as long as the source task is not started (rare case).
- gltEndToStart (default value): "End to Start" link: The destination task cannot start as long as the source task is not ended.
- gltEndToEnd: "End to End" link: The destination task cannot end as long as the source task is not ended.
- A link between 2 tasks is represented by an arrow.
- This type of variable:
- An "End to Start" link is created by default between two tasks: the task corresponding to the SourceID property must be finished before the DestinationID task can start.
- According to their types, the links are drawn on the start or end borders of the tasks.
Using GanttLink variablesGanttLink
variables are used by the following functions:
|GanttAddLink||Creates an "End to Start" link between two tasks displayed in a Gantt Chart column found in a Table (or TreeView Table) control.|
|GanttDeleteLink||Removes links from a Gantt Chart column in a Table or TreeView Table control.|
|GanttListLink||Lists the links found in a Gantt Chart column found in a Table (or TreeView Table) control.|
Complete examples (WINDEV): WD Gantt
Unit examples (WINDEV): The Gantt control