Custom SaveAsDialog but on OpenDialog ?

There is an example there: SaveAsDialog that allows to add a custom popup menu that displays a list of filetypes. Nice to allows an Export As… set of functions…

Is there’s the same, but on Open ? (OpenDialog does not seems to have it).

OpenAsDialog does not exists and OpenDialog does not seem to have it.

OpenDialog has a SuggestedFileName property. But on certain platforms the OS does not support it. Check out FolderItemDialog.

Why an open dialog when saving?

I think he would like to shop a PopupMenu with the possible file types to open.

Yes, that was that !

Sorry for the wrong impression at read time.

My fault: at coding time I took the SaveAsDialog example for the Open MenuItem. I was disturbed and certainly am too now.

I want to use the same Popup menu that display the file types options in both Open and Save Dialogs. I hope it is clear now.

[quote=121273:@Eli Ott]
I think he would like to shop a PopupMenu with the possible file types to open.[/quote]

for there is the filter to open only certain files (in OpenDialog)

  Dim f As FolderItem
  Dim dlg As New OpenDialog
 dlg.filter = FileTypes1.Jpeg + FileTypes1.Png
  f = dlg.ShowModal
  If f <> Nil and f.Exists Then
    // do it
  End If

Hi Axel,

Thank you for your answer.

Try to add a third file type, run and tell me you can open all three files types (it stopped at two here).

As I stated earlier, I started with a mistake: I copy a SaveAsDialog code to the OpenDialog Menu Event. Then when I saw a field to provide a file name, I was surprised and after some attempts, I realized that I’ve made an error. I only replaced SaveAsDialog with OpenDialog and ran into a series of non working (or working) runs 'till I realized that the “used feature” does not exists (or so).

After seen the SaveAsDialog images in the docs, do you think that we miss this feature ?

Nota: It is a question intended to reassure me, because I suppose that even if it is possible, it is not tomorrow the day before which we will have this functionality in Xojo!