你
你若有情
Unregistered / Unconfirmed
GUEST, unregistred user!
我用TDateTimePick控件当用户更改了日期时弹出一个对话框!但是每天更改后都会显示两次对话!触发一次怎么办!
procedure TDeliverAddForm.date_DeliverDateChange(Sender: TObject);
begin
returnDlg:=MessageDlg('您是要更改日期还是要新建一张送货单',mtConfirmation,[mbYes,mbNo,mbCancel],0);
if returnDlg=mrYes then
begin
ShowMessage('yes');
end
else if returnDlg=mrNo then
begin
ShowMessage('no');
end
else if returnDlg=mrCancel then
begin
ShowMessage('cancel');
end;
end;
procedure TDeliverAddForm.date_DeliverDateChange(Sender: TObject);
begin
returnDlg:=MessageDlg('您是要更改日期还是要新建一张送货单',mtConfirmation,[mbYes,mbNo,mbCancel],0);
if returnDlg=mrYes then
begin
ShowMessage('yes');
end
else if returnDlg=mrNo then
begin
ShowMessage('no');
end
else if returnDlg=mrCancel then
begin
ShowMessage('cancel');
end;
end;