savefiledialog

Qt customizing save file dialog

╄→гoц情女王★ 提交于 2020-01-02 04:47:06
问题 I need to customize default Qt save file dialog: add some options in it. For example, adding some checkboxes with my own values in it between file type and save/close buttons. Have Qt any ways to do it? 回答1: You can customize the Qt file dialog as long as you're okay with using the "non-native" Qt file dialog that comes with Qt; the other option Qt provides is to use the OS's native file dialog, but if you do that there is no way (that I'm aware of) to customize the dialog. Here's an example

How to avoid of file name validation in SaveFileDialog C#

╄→尐↘猪︶ㄣ 提交于 2020-01-01 06:12:07
问题 Is it possible to avoid of fileName validation in SaveFileDialog? var saveFileDialog = new SaveFileDialog { Filter = "Job package (*.job)|*.job", CheckPathExists = false, ValidateNames = false }; var result = saveFileDialog.ShowDialog(); if (result.Value) { ....my own validation.... } The ValidateNames property doesn't work. Anyway, when I type a name with invalid characters, the dialog shows it's own popup "The file name is not valid". Can I avoid it? How? 来源: https://stackoverflow.com

DialogResult.OK on SaveFileDialog not work

别等时光非礼了梦想. 提交于 2019-12-30 22:56:06
问题 I try, when I press save in SaveFileDialog I do something. I trying fix but always something wrong. SaveFileDialog dlg2 = new SaveFileDialog(); dlg2.Filter = "xml | *.xml"; dlg2.DefaultExt = "xml"; dlg2.ShowDialog(); if (dlg2.ShowDialog() == DialogResult.OK) {....} But I have error on OK - which say: Error: 'System.Nullable' does not contain a definition for 'OK' and no extension method 'OK' accepting a first argument of type 'System.Nullable' could be found (are you missing a using directive

Customizing Win32's Save File Dialog

旧时模样 提交于 2019-12-30 12:51:11
问题 I am trying to save a file using GetSaveFileName and want to have a couple extra popups at the bottom of my save file dialog to allow the user to specify further options. I am trying to follow the MSDN documentation (specifically the Explorer-style customization) on the subject but can't seem to get my custom item to appear. I believe I set up the OPENFILENAME struct properly as I'm getting calls into my OFNHookProc . As far as I know it is during the WM_INITDIALOG message that I should be

SaveFileDialog producing unrecognized character

无人久伴 提交于 2019-12-26 03:34:01
问题 My program is supposed to create a text file, but it is adding invisible unrecognized char(s) to the beginning of the text file. I can only see the invisible unrecognized char(s) when scanned. I was able to get the char(s) to go away by opening with word pad instead of notepad, typing a char, and backspacing then saving. That fixed the file, but I need to correct the code causing it. Am I messing up the file type and its adding a random char? Here is code for dialog and file name/type: Try

SaveFileDialog producing unrecognized character

徘徊边缘 提交于 2019-12-26 03:33:05
问题 My program is supposed to create a text file, but it is adding invisible unrecognized char(s) to the beginning of the text file. I can only see the invisible unrecognized char(s) when scanned. I was able to get the char(s) to go away by opening with word pad instead of notepad, typing a char, and backspacing then saving. That fixed the file, but I need to correct the code causing it. Am I messing up the file type and its adding a random char? Here is code for dialog and file name/type: Try

How to override download process in Chrome Extension

半世苍凉 提交于 2019-12-25 10:02:25
问题 I am trying to make a download manager extension in chrome browser. I can monitor chrome downloads via chrome.downloads API. But, I want to override the download process and handle download destination with my extension instead of default "saveFileDialog". Is there any way to do so? 回答1: Many download managers are available from the store, so it is possible. Some of them are open-source and available on github, so have a look before starting your own. If you want to replaces the default

How to override download process in Chrome Extension

有些话、适合烂在心里 提交于 2019-12-25 10:00:18
问题 I am trying to make a download manager extension in chrome browser. I can monitor chrome downloads via chrome.downloads API. But, I want to override the download process and handle download destination with my extension instead of default "saveFileDialog". Is there any way to do so? 回答1: Many download managers are available from the store, so it is possible. Some of them are open-source and available on github, so have a look before starting your own. If you want to replaces the default

File does not exist verify if file name exist SaveFileDialog?

只愿长相守 提交于 2019-12-25 02:21:33
问题 I want to save a file using the SaveFileDialog control. Why does the file need to already exist in order to save it? This is the code I am using: string month = dateTimePicker1.Value.Month.ToString(); string year = dateTimePicker1.Value.Year.ToString(); SaveFileDialog saveFileDialog1 = new SaveFileDialog(); saveFileDialog1.InitialDirectory = @"C:\"; saveFileDialog1.Title = "Save Sql Files"; saveFileDialog1.FileName = "MysqlBackup-"+month+"-"+year+".sql"; saveFileDialog1.CheckFileExists = true

SaveAs Dialog with a period in the filename does not return extension

半腔热情 提交于 2019-12-24 20:19:31
问题 How do I make sure SaveAs Dialog return a filename with the extension? For Example: 'Test' (.txt) return 'test.txt' But: 'Test 1.0' (.txt) return 'Test 1.0' (Should be 'Test 1.0.txt') Possible solution: I can manually check if there is a '.txt' at the end, but if there are two extension types (.txt, .doc), how do I know which one the user selected? Thank you! 回答1: I believe you need to set the .SupportMultiDottedExtensions to True, like so: Using tDialog As SaveFileDialog = New SaveFileDialog