PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Retrieving a task
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
Retrieves a task from its identifier in a Gantt Chart column (found in a Table or TreeView Table control).
Example
// Récupération d'une tâche pour la modifier
MaTâche is GanttTask
MaTâche <- GanttGetTask(COL_Gantt, "ID2")
MaTâche.Title = "Nouveau titre"
// Récupération d'une tâche
MaTâche is GanttTask
MaTâche = GanttGetTask(COL_Gantt, "ID1")
InfoBuild("Tâche récupérée: %1", MaTâche.Title)
Syntax
<Result> = GanttGetTask(<Gantt column> , <Identifier>)
<Result>: GanttTask variable
Name of the GanttTask variable from which the task characteristics are retrieved.
<Gantt column>: Character string (with or without quotes)
Name of Gantt Chart column (found in a Table or TreeView Table control) to use.
<Identifier>: Character string (with quotes)
Identifier of the task to retrieve. This identifier corresponds to the Property ID defined in the Variable of type GanttTask.
A WLanguage error occurs if the specified identifier does not exist.
Remarks

Retrieving a task

To retrieve a task, you can:
  • use the "=" operator. In this case, you can find out the characteristics of the retrieved task.
  • use the "<-" operator. In this case, you can dynamically modify the retrieved task.
1st case: Using the "=" operator.
In this case, you can find out the characteristics of the retrieved task.
<Nom de la variable> = GanttRécupèreTâche(<Colonne Gantt>, <Identifiant>)
For example:
// Récupération d'une tâche
MaTâche is GanttTask
MaTâche = GanttGetTask(COL_Gantt, "ID1")
InfoBuild("Tâche récupérée: %1", MaTâche.Title)
You also have the ability to retrieve a task by using the following syntax:
<Nom de la variable> = <Colonne Gantt>["<Identifiant>"]
For example:
MaTâche is GanttTask
MaTâche = COL_Gantt["ID1"]
InfoBuild("Tâche récupérée: %1", MaTâche.Title)
2nd case: Using the "<-" operator.
In this case, you can dynamically modify the retrieved task.
<Nom de la variable> <- GanttRécupèreTâche(<Colonne Gantt>, <Identifiant>)
where Identifier is the identifier of the task to retrieve.
For example:
// Modification d'une tâche
MaTâche is GanttTask
MaTâche <- GanttGetTask(COL_Gantt, "ID1")
MaTâche.Progress = 70
MaTâche.ProgressColor = LightGreen
You also have the ability to retrieve a task by using the following syntax:
<Nom de la variable> <- <Colonne Gantt>["<Identifiant>"]
For example:
t <-COL_Gantt["ID1"]
t..BackgroundColor = LightBlue
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.
Component: wd260mdl.dll
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment