FNCPlanner FixedTime ?

I just want to be able to move the entry to the left/right to another resource. But do NOT have the opportunity to move up/down and change the time. For the VCLPlanner I have "FixedTime". With FCPLanner I only have "FixedResource". How can I move an item without having the risk of also having to change the time.


There is currently no FixedTime property, we'll write it down to take a look at implementing this. In the meantime you can use the OnBeforeMoveItem and check the ANewStartTime & ANewEndTime parameters before allowing the item to move by setting ACanMove parameter.

procedure TForm2.TMSFNCPlanner1BeforeMoveItem(Sender: TObject;
  AItem: TTMSFNCPlannerItem; var ANewStartTime, ANewEndTime: TDateTime;
  var ANewPosition: Integer; var ACanMove: Boolean);
  ACanMove := TMSFNCPlanner1.ResourceToPosition(AItem.Resource) <> ANewPosition;
  ACanMove := ACanMove and (CompareDateTime(ANewStartTime, AItem.StartTime) = EqualsValue) and
    (CompareDateTime(ANewEndTime, AItem.EndTime) = EqualsValue);

Thx Pieter,
That solves my problem. :slight_smile:

1 Like

Thanks for confirming.