Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxGanttControlChartViewGetLinkColorEvent Type

The color-related procedural type for task dependencies in the Chart View.

#Declaration

Delphi
TdxGanttControlChartViewGetLinkColorEvent = procedure(Sender: TdxGanttControlChartView; ALink: TdxGanttControlTaskPredecessorLink; var AColor: TColor) of object;

#Parameters

Name Type Description
Sender TdxGanttControlChartView

The Chart View that raised the event.

ALink TdxGanttControlTaskPredecessorLink

The dependency whose color is about to be changed.

AColor TColor

A system palette color.

#Remarks

A dependency is filled with the same color as its predecessor task. The following code example makes the dependency between the first and second tasks yellow (clYellow):

procedure TMyForm.FormCreate(Sender: TObject);
begin
  // Loads a chart from the specified XML file
  dxGanttControl1.LoadFromFile('C:\Users\Public\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressGanttControl\Data\SoftwareDevelopment.xml');
end;

procedure TMyForm.dxGanttControl1ViewChartGetLinkColor(
begin
  // Checks if the dependency links the first and second tasks
  if (ALink.PredecessorUID = 2) and (ALink.Task.UID = 3) then
    // Fills the dependency with the yellow color
    AColor := clYellow;
end;
See Also