Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Hide file extensions in FileDialog filter(A filter with many multiple extensions does not fit on-screen)
Hide file extensions in FileDialog filter [message #1027298] Tue, 26 March 2013 20:40 Go to next message
Steven Darnell is currently offline Steven DarnellFriend
Messages: 18
Registered: November 2010
Junior Member
I have a file dialog with multiple filters each with multiple file extensions. I want to include an "All known files" filter with every file extension the application recognizes. This list is very long and will not fit on screen. On Mac, the FileDialog sizes the filter combo box the width of the widest filter string. The control is not easily usable because the string is too wide to fit on-screen and the text is centered so you cannot read the filter description at the beginning.

Can I hide the file extensions in the FileDialog filter combo box drawn on-screen but still associate the extensions with the filter?
Re: Hide file extensions in FileDialog filter [message #1027477 is a reply to message #1027298] Wed, 27 March 2013 02:17 Go to previous messageGo to next message
Steven Darnell is currently offline Steven DarnellFriend
Messages: 18
Registered: November 2010
Junior Member
Screenshots of problem:

All known formats filter on Mac
http://i.stack.imgur.com/MMhIO.png

Available filters for files recognized by the application
http://i.stack.imgur.com/S5rcK.png
Re: Hide file extensions in FileDialog filter [message #1027926 is a reply to message #1027477] Wed, 27 March 2013 15:59 Go to previous message
Steven Darnell is currently offline Steven DarnellFriend
Messages: 18
Registered: November 2010
Junior Member
FileDialog requires that you provide a list of descriptions and a list of extensions to define a set of filters. I overlooked the fact that my code concatenated the descriptor and the extension list to make a more descriptive label. This was done at a time when the number of supported file types was small. The answer is to provide a condition where the extension list is not appended to the description "All known formats." That's embarrassing...
Previous Topic:Global Key Listener
Next Topic:StyledText controls
Goto Forum:
  


Current Time: Sun Dec 21 21:35:43 GMT 2014

Powered by FUDForum. Page generated in 0.02444 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software