Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function DialogKonfirmasi(Pesan1, Pesan2: String): boolean;
- begin
- DialogKonfirmasi := True;
- {MessageDlg dengan button bahasa indonesia.}
- with CreateMessageDialog(Pesan1, mtConfirmation, [mbYes, mbNo]) do
- begin
- try
- Caption := 'Pesan Konfirmasi';
- TButton(FindComponent('Yes')).Caption := 'Ya';
- TButton(FindComponent('No')).Caption := 'Tidak';
- case ShowModal of
- mrYes : begin
- with CreateMessageDialog(Pesan2, mtConfirmation, [mbYes, mbNo]) do
- begin
- try
- Caption := 'Pesan Konfirmasi';
- TButton(FindComponent('Yes')).Caption := 'Ya';
- TButton(FindComponent('No')).Caption := 'Tidak';
- case ShowModal of
- mrNo : begin
- DialogKonfirmasi := False;
- Exit;
- end;
- end;
- finally
- Free;
- end;
- end;
- end;
- mrNo : begin
- DialogKonfirmasi := False;
- Exit;
- end;
- end;
- finally
- Free;
- end;
- end;
- end;
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- DialogKonfirmasi(Edit1.Text, Edit2.Text);
- end;
Advertisement
Add Comment
Please, Sign In to add comment