Sign in to follow this  
gkimsey

Filesavedialog() Not Showing Files According To Filter, "save As Type" Has Strange Entries

Recommended Posts

I have a pretty straightforward File Save Dialog in a quick sequence. Code looks like this:

private string fileName = file.FileSaveDialog(g_log_filename,"","*.csv","CSV Files")[/CODE]

where g_log_filename is an existing global string containing the full path to a CSV file.

But when the dialog comes up I don't see existing files with the CSV extension in the directories I'm working through. I thought the filter might be wrong, but "*.csv" is exactly what tooltip example has in it. How do I fix this?

Also, at the bottom of the dialog where you can choose "Save as type..." from a dropdown, there is usually some random text from one of my scripts stuck in there somehow. I'm guessing the FileSaveDialog doesn't actually use the Save As Type, but it'd be better if it only showed *.csv.

See attached screenshot. OS is Windows 7.

post-8957-0-04840800-1372785100_thumb.pn

Share this post


Link to post
Share on other sites

Windows is a little messed up here. To get it to display *.csv you have to put *.csv in the first parameter. The weird display also appears to be some sort of Windows glitch. It does it in Windows 8 too. We'll take a closer look.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this