View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015677 | Lazarus | LCL | public | 2010-02-04 13:58 | 2010-05-05 08:35 |
Reporter | Tomasz Wieckowski | Assigned To | Paul Ishenin | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.9.29 (SVN) | Product Build | |||
Target Version | 1.0.0 | Fixed in Version | 0.9.29 (SVN) | ||
Summary | 0015677: Filter in SaveFileDialog | ||||
Description | There is a problem with showing the extension in the filename filed of SaveDialog window. The problem is in the Windows Vista and 7 without "Hide extensions for known file types" options in explorer, on Windows XP this option does not change anything in the filename field (don't add extension from filter). | ||||
Additional Information | 1. On Windows 7, Vista - uncheck "Hide extensions for known file types" 2. Set SaveDialog options - SaveDialog1.Filter:='text (*.txt)|*.txt|csv (*.csv)|*csv'; - SaveDialog1.FileName:='Project'; - SaveDialog1.Execute; 3. On SaveDialog executed change type to csv and then you will see still "Project.txt" | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
LazTarget | 1.0 | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
duplicate of | 0007797 | closed | Bart Broersma | SaveDialog.Filter does not change the file's extension. |
|
I found a very helpful code solves this problem. Maybe you can use this code to fix the problem with Vista and w7. http://www.dotfusion.net/vista-compatible-open-and-save-dialog-in-lazarus-freepascal |
|
looks like aready reported in 2006. see report 0007797. |
|
I'm not able to reproduce on windows 7 + unchecked "Hide extensions for known file types". Please retest and close if it is fixed for you or reopen with more instructions. |
|
I can't test on W7 now, only on Vista and problem still exists. I simple put this code on button click: - SaveDialog1.Filter:='text (*.txt)|*.txt|csv (*.csv)|*csv'; - SaveDialog1.FileName:='Project'; - SaveDialog1.Execute; and explorer is set to display extensions. I attached screenshots - withTXT.jpg - what I see when SaveDialog show - withCSV.jpg - what I see when I change filter to csv, FileName is still with txt (user need manually change extension) |
2010-05-04 11:06
|
|
2010-05-04 11:07
|
|
|
tested with rev 24900 (with or without dOldAutoSize). Box with files works ok, when change to csv, files are filtered to show only csv files. Only filename doesn't want to change. |
|
Why Filename should change? Filter is only used to filter the shown files. It has no effect on filename. So can we close this issue? |
|
@Paul: the filter actually affected the filename already by adding ".txt" suffix. Logically it should change the suffix when filter changes. I haven't tested it myself but I would say this is inherent behavior of Windows SaveDialog. The bug report should go to Microsoft. |
|
No Filename but only extension. I realized that it just not necessary to change the file name extension (what if we would have couple extensions in one filter line). I suggested this as it work in MSPaint and others but it's probably not a standard feature (but it would be nice if I could change extension on filename). In Windows XP extension is not displayed in the file name (regardless of whether we have set display extensions in explorer) so there is no problem. OK we can close this. |
|
BTW If I use SaveDialog code from link in my first post I don't have extension in filename. |
|
I see no good way of hiding file extension. Moreover this is standard behavior of windows dialog. In your example it does not change file extension when you choose csv because this file type is not registered. I tried with .pas files and it changes the extension in this case. Please close if ok. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-02-04 13:58 | Tomasz Wieckowski | New Issue | |
2010-02-04 13:58 | Tomasz Wieckowski | Widgetset | => Win32/Win64 |
2010-02-09 22:04 | Tomasz Wieckowski | Note Added: 0034338 | |
2010-02-13 16:01 | samuel herzog | Note Added: 0034447 | |
2010-02-16 20:41 | Vincent Snijders | Relationship added | duplicate of 0007797 |
2010-02-16 20:41 | Vincent Snijders | LazTarget | => 1.0 |
2010-02-16 20:41 | Vincent Snijders | Status | new => acknowledged |
2010-02-16 20:41 | Vincent Snijders | Target Version | => 1.0.0 |
2010-05-04 03:04 | Paul Ishenin | Status | acknowledged => resolved |
2010-05-04 03:04 | Paul Ishenin | Fixed in Version | => 0.9.29 (SVN) |
2010-05-04 03:04 | Paul Ishenin | Resolution | open => unable to reproduce |
2010-05-04 03:04 | Paul Ishenin | Assigned To | => Paul Ishenin |
2010-05-04 03:04 | Paul Ishenin | Note Added: 0037210 | |
2010-05-04 11:06 | Tomasz Wieckowski | Note Added: 0037238 | |
2010-05-04 11:06 | Tomasz Wieckowski | File Added: withTXT.jpg | |
2010-05-04 11:07 | Tomasz Wieckowski | File Added: withCSV.jpg | |
2010-05-04 11:07 | Tomasz Wieckowski | Status | resolved => assigned |
2010-05-04 11:07 | Tomasz Wieckowski | Resolution | unable to reproduce => reopened |
2010-05-04 11:22 | Tomasz Wieckowski | Note Added: 0037239 | |
2010-05-04 11:29 | Paul Ishenin | Note Added: 0037240 | |
2010-05-04 11:58 | Juha Manninen | Note Added: 0037242 | |
2010-05-04 12:00 | Tomasz Wieckowski | Note Added: 0037244 | |
2010-05-04 12:24 | Tomasz Wieckowski | Note Added: 0037248 | |
2010-05-05 05:18 | Paul Ishenin | Status | assigned => resolved |
2010-05-05 05:18 | Paul Ishenin | Resolution | reopened => fixed |
2010-05-05 05:18 | Paul Ishenin | Note Added: 0037271 | |
2010-05-05 08:35 | Tomasz Wieckowski | Status | resolved => closed |