Skip to main content
Table of Contents

TTMSFNCGanttTasks.InsertTask Method

Inserts a task and initializes its scheduling and display values.

API unit family: TMSFNCGanttClasses Declaring type: TTMSFNCGanttTasks

Syntax

FMX.TMSFNCGanttClasses.hppPascalC++
function InsertTask(Index: Integer; AName: string; ADescription: string; AStartDate: TDateTime = 0; ADurationValue: Double = 0; ADurationType: TTMSFNCGanttDurationType = gdtSeconds; AWorkTimePolicy: TTMSFNCGanttTaskWorkTimePolicy = whWorkTimeAndDays; AProgress: Integer = 0; AState: TTMSFNCGanttTaskState = nil): TTMSFNCGanttTask;
TTMSFNCGanttTask* __fastcall InsertTask(int Index, System::UnicodeString AName, System::UnicodeString ADescription, System::TDateTime AStartDate = 0.000000E+00, double ADurationValue = 0.000000E+00, TTMSFNCGanttDurationType ADurationType = (TTMSFNCGanttDurationType)(0x0), TTMSFNCGanttTaskWorkTimePolicy AWorkTimePolicy = (TTMSFNCGanttTaskWorkTimePolicy)(0x0), int AProgress = 0x0, TTMSFNCGanttTaskState* AState = (TTMSFNCGanttTaskState*)(0x0));

Parameters

Name Description
Index Zero-based insertion index.
AName Task name.
ADescription Task description.
AStartDate Planned start date/time.
ADurationValue Duration value.
ADurationType Unit used by the duration value.
AWorkTimePolicy Calendar policy used to schedule the task.
AProgress Completion percentage.
AState Optional task state.

Returns

The newly created task.