Tuesday, 15 February 2011

java - Can I hide the file extensions in an SWT FileDialog filter? -


I have a SWT FileDialog (style: SWT.OPEN) with several filters with many file extensions I want to include a "all known format" filter with which the application recognizes. This list is very long and will not fit on the screen. On Mac, the File Dialog filter combo box gives the width of the broad filter string. Control is easily usable because the string is very extensive to fit on-screen and the text is centered so that you can not read the filter description in the beginning.

I can hide the file extension in the FileDialog filter combo box has been dragged on-screen but still connects the extension with the filter? Anyone have alternative suggestions?

Screenshot of problem

on Mac All known format filters  Available filters for files that are recognized by the app < P>

FileDialog requires that you provide a list of details and a list of extensions to define a set of filters. I ignored the fact that my code added a description and extension list to create a more descriptive label. It was at that time when the number of supported file types was small. The answer is to provide a situation where the extension list is not associated with "all known formats". It's embarrassing ...

Thank you for the people who answer.

No comments:

Post a Comment