问题
I'm using a file open dialog to chose image files for further editing. The filter list contains an "All supported formats" entry which represents a long list of file formats. Since Vista automatically appends the wildcard patterns in the filter combobox, the expanded combobox is too wide to fit completely on the screen. Besides that it doesn't look very well. So is it possible to disable this behaviour and let Vista display the original filter string?
Regards,
Daniel
回答1:
Vista only appends the file format list to the text if you haven't already done so yourself. So if your filter is "All Supported Formats|*.jpg;*.bmp;..." then it will automatically add it, but if it's "All Supported Formats (*.*)|*.*" then it doesn't. It does check that there is a wildcard, but it doesn't check that they match, so either of these approaches would work:
"All Supported Formats (*.*)|*.jpg;*.bmp;*.gif"
"All Supported Formats (*.jpg;...)|*.jpg;*.bmp;*.gif"
来源:https://stackoverflow.com/questions/2109466/how-to-disable-automatic-appending-of-wildcard-pattern-in-vista-file-open-dialog