vcl-dxganttcontrolviewchart-eb58a412.md
Performs a set of actions after tasks were linked with a dependency created by a mouse drag-and-drop operation.
TdxGanttControlTaskEndLinkEvent = procedure(Sender: TObject; APredecessorLink: TdxGanttControlTaskPredecessorLink) of object;
| Name | Type | Description |
|---|---|---|
| Sender | TObject |
The Chart View that raised the event.
| | APredecessorLink | TdxGanttControlTaskPredecessorLink |
The newly created dependency.
|
You can open the Features Demo and modify its code. Handle the OnTaskEndLink event and use the following code snippet to display the message that one task is the predecessor for another task:
procedure TFeaturesDemoMainForm.GanttControlViewChartTaskEndLink(Sender: TObject;
APredecessorLink: TdxGanttControlTaskPredecessorLink);
begin
ShowMessage('The ''' + GanttControl.DataModel.Tasks.GetItemByUID(APredecessorLink.PredecessorUID).Name + ''' task is now the predecessor of the ''' + APredecessorLink.Task.Name + ''' task');
end;
void __fastcall TFeaturesDemoMainForm::GanttControlViewChartTaskEndLink(TObject *Sender,
TdxGanttControlTaskPredecessorLink *APredecessorLink)
{
ShowMessage("The '" + GanttControl->DataModel->Tasks->GetItemByUID(APredecessorLink->PredecessorUID)->Name + "' task is now the predecessor of the '" + APredecessorLink->Task->Name + "' task");
}
See Also