Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TPlanner
Adding a messagebox to query if it is allowed to effectively delete a PlannerItem

When the TMS T(DB)Planner.AutoInsDel is set to true, deleting a PlannerItem can be done by just selecting the PlannerItem and pressing DEL. To add a messagebox to query if it is allowed to effectively delete the PlannerItem, add following code to the OnItemDelete event:
procedure TForm2.Planner1ItemDelete(Sender: TObject; Item: TPlannerItem);
begin
  if MessageDlg('Delete this item?',mtConfirmation,[mbYes,mbNo],0) = mrNo then
    Abort;
end;