I set the default file name is answer_XXXXXX.csv in OpenFileDialog. But it displays like this. The default name "answer_XXXXXX.csv" isn't displayed full.
Then I click on File name combo box. It displays exactly
How can I fix it?
Thanks in advance.
There is a small workaround for this. Have below line before calling ShowDialog().
Example:
For more:
http://connect.microsoft.com/VisualStudio/feedback/details/525070/openfiledialog-show-part-of-file-name-in-win7
King King's answer seems to be the best solution, I've used basically the same but perhaps a bit simpler (apparently I haven't got the reputation to up-vote or comment directly on his post):
Here is another work around, you can use more complex Win32 api functions to access the filename combobox and do whatever you want but this work around uses
SendKeys
, I have no time to dig into Win32 API functions at this time:I can't explain this bug but there are some work arounds and the above one is one of them.