I had thought there was something unusual about the FileChooser for a while, last night it dawned on me that it is not possible to select a specific file type from the list.
I have created a Utils module to allow this.
There are 4 options (only to save typing when setting it up) that allow entering individual file extensions that then are individually selectable, you have to enter a description for each file extension, you can also add a merged filter (with a separate name) this is what we have now, and a further option to add an all files filter, and an option for both.
There is also a method to set the initially selected filter.
It's a static module, so you need to pass a FileChooser object to each call.
You can compile it to a library if you don't want to add the module to a project.
Hope you find it useful.
I have created a Utils module to allow this.
There are 4 options (only to save typing when setting it up) that allow entering individual file extensions that then are individually selectable, you have to enter a description for each file extension, you can also add a merged filter (with a separate name) this is what we have now, and a further option to add an all files filter, and an option for both.
There is also a method to set the initially selected filter.
It's a static module, so you need to pass a FileChooser object to each call.
You can compile it to a library if you don't want to add the module to a project.
Hope you find it useful.
Attachments
Last edited: