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 theres the same, but on Open ? (OpenDialog does not seems to have it).
OpenAsDialog does not exists and OpenDialog does not seem to have it.
[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
Else
Return
End If
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!