Page 1 of 1

OpenFile dialog : file extension filters

Posted: Tue Dec 03, 2013 11:45 am
by AgfaDev
When using for instance:

Code: Select all

public int CreateGdPictureImageFromFile(
    String FilePath
When passing an empty string to the function, an internal FileOpen dialog is created to select a file to open.
This dialog does not have a file extension filter option.
So, the list of files contain all files, even the ones which are clearly no image files.

It would be nice that this dialog has a combobox option (like the default windows file open dialog) to select a file extension.
(eg *.jpg, *.png etc) separately.

Also an option to select all image types.
And yes, also the option *.* (all files) which is now the default behavior of the dialog.

The default should be "All images" with the list of GdPicture supported filetype extensions.

This would filter the file list which is much easier for the end user to locate possible images.
Now the user has to manually scroll and locate the images visually or type in a *.jpg into the file field to filter the list.

I think the best way to see my request is how Windows Paint manages the FileOpen dialog.
See screenshot below.

Re: OpenFile dialog : file extension filters

Posted: Tue Dec 03, 2013 1:40 pm
by Cedric
This is out of the GdPicture.NET scope, we have no control over the default OpenFileDialog that is prompted when passing a empty path, this is a .NET Framework behavior.
Please refer to the MSDN documentation