Wrapper function for VerifyMessage Creates a dialog with the verification checkbox visible.
function VerifyMessage(const aMsg: TJSString; const aIcon: TTaskDialogIcon; const aButtons: TCommonButtons; const aHelpIdx: Integer; const aMsgType: TMsgType; const aVerifyText: TJSString; var aVerifyResult: Boolean): TModalResult; overload;
JSDialogs
The verification result is passed through the aVerifyResult parameter.
Set the aVerifyResult parameter to True to have the checkbox checked when the dialog initially displays.
procedure MainForm.SaveAttachment; var lAlwaysUnzip: Boolean; begin if not GuiOptions.AlwaysUnzipAttachments then begin if VerifyMessage('Do you want to unzip the saved attachment?' tdiConfirmation, [cbYes, cbNo], 0, mtInstruction, 'Always unzip attachments', lAlwaysUnzip) = mrOK then begin GuiOptions.AlwaysUnzipAttachments := lAlwaysUnzip; // unzip attachment end; end; end;
Copyright © 2013 by LMD Innovative. All rights reserved.
|
What do you think about this topic? Send feedback!
|