- Code: Select all
procedure TMainForm.SimpleGraphKeyUp(Sender: TObject; var Key: Word;
if Key = VK_DELETE then
if (MessageDlg('Are you sure you want to delete the selected object(s)?', mtConfirmation, [mbYes, mbNo], 0) <> mrYes) then
Key := 0;
But the node is deleted before the MessageDlg even appears.