TdxGanttControlTaskPercentCompleteChangeEvent Type
In This Article
#Declaration
Delphi
TdxGanttControlTaskPercentCompleteChangeEvent = procedure(Sender: TObject; ATask: TdxGanttControlTask; ANewValue: Integer; var AAccept: Boolean) of object;
#Parameters
Name | Type | Description |
---|---|---|
Sender | TObject | The Chart View that raised the event. |
ATask | Tdx |
The task whose progress a user is changing. |
ANew |
Integer | The new value for ATask progress. |
AAccept | Boolean | Specifies if the event handler accepts or declines the task progress change. |
#Remarks
You can open the Features Demo and modify its code. Handle the OnPercentCompleteChange event and use the following code snippet that restricts users from decreasing the task progress percentage:
procedure TFeaturesDemoMainForm.GanttControlViewChartChangePercentComplete(Sender: TObject; ATask: TdxGanttControlTask; ANewValue: Integer; var AAccept: Boolean);
begin
AAccept := ATask.PercentComplete < ANewValue;
end;
See Also