Native_windows_gui save file dialog

I'm letting the user save a file on windows, using the following code

  use native_windows_gui as nwg;

  let mut diag = nwg::FileDialog::default();

    nwg::FileDialog::builder()
      .title(title)
      .action(nwg::FileDialogAction::Save)
      .filters(filter.to_str())
      .default_folder(dir)
      .multiselect(false)
      .build(&mut diag);

What I'm now trying to do is set a default filename. I can set a default folder, as shown in the excerpt, but I did not find a way to set a default filename.

Does anyone know how to do that? Thanks for any pointers!

What crate are you using? There is no nwg on crates.io.

Oh, sorry, it's native_windows_gui, as alluded in the title. I'll edit it in, thanks!

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.