Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

LMD Dialogs - error with Native

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
2020-11-11_8-27-22.png
7K

Comments

Sign In or Register to comment.