Back to Devexpress

TdxGanttControlTaskPercentCompleteStartChangeEvent Type

vcl-dxganttcontrolviewchart-f9a00aca.md

latest2.3 KB
Original Source

TdxGanttControlTaskPercentCompleteStartChangeEvent Type

Performs a set of actions before a user changes task progress with a mouse drag-and-drop operation.

Declaration

delphi
TdxGanttControlTaskPercentCompleteStartChangeEvent = 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 progress is about to be changed.

| | AAllow | Boolean |

If True , a user can move the mouse pointer to the left or right over the task’s bar (while holding down the left mouse button) to change the progress percentage. If False , the operation is prohibited.

|

Remarks

You can open the Features Demo and modify its code. Handle the OnPercentCompleteStartChange event and use the following code snippet to forbid the progress change operation for summary tasks:

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

See Also

TdxGanttControlTaskPercentCompleteChangeEvent

TdxGanttControlTaskPercentCompleteEndChangeEvent

dxGanttControlViewChart Unit