Back to Devexpress

TdxGanttControlTaskStartResizeEvent Type

vcl-dxganttcontrolviewchart-d12bf183.md

latest1.9 KB
Original Source

TdxGanttControlTaskStartResizeEvent Type

Performs a set of actions to prevent users from changing a task‘s width with the mouse.

Declaration

delphi
TdxGanttControlTaskStartResizeEvent = procedure(Sender: TObject; ATask: TdxGanttControlTask; var AAllow: Boolean) of object;

Parameters

NameTypeDescription
SenderTObject

The Chart View that raised the event.

| | ATask | TdxGanttControlTask |

The task whose finish date is about to be changed.

| | AAllow | Boolean |

If True , a user can resize tasks in the chart. If False , the operation is prohibited.

|

Remarks

You can open the Features Demo and modify its code. Handle the OnTaskStartResize event and use the following code snippet to restrict users from resizing summary tasks and milestones:

delphi
procedure TFeaturesDemoMainForm.GanttControlViewChartTaskStartResize(Sender: TObject; ATask: TdxGanttControlTask; var AAllow: Boolean);
begin
  AAllow := not (ATask.Summary or ATask.Milestone);
end;
cpp
void __fastcall TFeaturesDemoMainForm::GanttControlViewChartTaskStartResize(TObject *Sender,
          TdxGanttControlTask *ATask, bool &AAllow)
{
  AAllow = !(ATask->Summary) || (ATask->Milestone);
}

See Also

TdxGanttControlTaskResizeEvent

TdxGanttControlTaskEndResizeEvent

dxGanttControlViewChart Unit