SaveAsDialog - need help

Hi,

I am trying to assign a file name to the file that is going to be saved via SaveAsDialog

This is the code that I have

Dim t As TextOutputStream
  Dim f As FolderItem
  Dim dlg As SaveAsDialog
  Dim d as Date
  
  dlg = New SaveAsDialog
  
  f = dlg.ShowModal() // open save as dialog for entering the file name and selecting location to save

How can I put a custom name into the dialog that would consist of a predefined text such as “My File” and the date and time?

Any help is very appreciated.

I’ve done it a couple of years ago when Xojo was still RealStudio but I have lost to my old files and my old posts on the forum.

Thank you in advance.

Val


Have you tried looking at the documentation for SaveAsDialog?

The SaveAsDialog is used to let the user choose a file name. Perhaps you should just use a SelectFolderDialog. Or you can prompt the user with with the PromptText property.

SaveAsDialog.SuggestedFileName

Thank you, Tim