Please see attached.
Code:
var
Task: TNGTaskDialog;
ws: Integer;
btn: TNGTaskDlgButtonItem;
begin
Task := TNGTaskDialog.Create(nil);
repeat
Task.Caption := Application.Title;
Task.Title := str;
Task.Text := strTitle;
Task.FooterText := strbottom;
Task.MainIcon := tdiInformation;
Task.Buttons := [tcbOk];
Task.DefaultButton := tcbOk;
//
if Task.CustomButtons.Count = 0 then begin
btn := Task.CustomButtons.Add;
btn.Caption := '&Co&py to Clipboard';
btn.ModalResult := 100;
end;
//
task.PlatformMode := TNGTaskDlgPlatformMode.tdmNever;
task.Flags := task.Flags + [tdfAllowDialogCancellation];
ws := Task.Execute;
if ws = 100 then begin
Clipboard.AsText := Task.Title + #10 + Task.Text + #10 + Task.FooterText;
end;
until ws <> 100;
Task.Free;
png
png
Comments
NG Controls 2020.1 (May 27, 2020)