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

TdxGanttControlTaskResizeEvent Type

Performs a set of actions during a task size change with the mouse.

#Declaration

Delphi
TdxGanttControlTaskResizeEvent = procedure(Sender: TObject; ATask: TdxGanttControlTask; ANewFinish: TDateTime; var AAccept: Boolean) of object;

#Parameters

Name Type Description
Sender TObject

The Chart View that raised the event.

ATask TdxGanttControlTask

A task that a user resizes.

ANewFinish TDateTime

ATask‘s new finish date.

AAccept Boolean

Specifies if the event handler accepts or declines the task resize operation in response to a mouse drag-and-drop action.

#Remarks

You can open the Features Demo and modify its code. Handle the OnTaskResize event and use the following code snippet that prevents users from decreasing a task duration to zero days:

procedure TFeaturesDemoMainForm.GanttControlViewChartTaskResize(Sender: TObject; ATask: TdxGanttControlTask; ANewFinish: TDateTime; var AAccept: Boolean);
begin
  AAccept := ANewFinish - ATask.Start > 0;
end;
See Also