Questions tagged [filedialog]

Refers to both OpenFileDialog and SaveFileDialog in .NET WinForms.

This tag represents both the OpenFileDialog class and SafeFileDialog class from .NET. More information about them on MSDN here and here respectively.

358 questions
49
votes
4 answers

filedialog, tkinter and opening files

I'm working for the first time on coding a Browse button for a program in Python3. I've been searching the internet and this site, and even python standard library. I have found sample code and very superficial explanations of things, but I haven't…
Icsilk
  • 567
  • 1
  • 5
  • 9
49
votes
4 answers

Does WPF have a native file dialog?

Under System.Windows.Controls, I can see a PrintDialog However, I can't seem to find a native FileDialog. Do I need to create a reference to System.Windows.Forms or is there another way?
Sebastian Gray
  • 2,590
  • 3
  • 26
  • 36
29
votes
3 answers

Defaulting a folder for FileDialog in VBA

Private Sub Command93_Click() Dim f As Object Dim strFile As String Dim strFolder As String Dim varItem As Variant Dim P As String Dim DeleteEverything As String DoCmd.SetWarnings False DeleteEverything =…
Chuck
  • 1,156
  • 2
  • 10
  • 19
28
votes
5 answers

What does the FileDialog.RestoreDirectory Property actually do?

I've read about the property on MSDN, but I still don't understand what it does. Gets or sets a value indicating whether the dialog box restores the current directory before closing. What exactly does that mean? What does 'restoring' the…
delete
27
votes
3 answers

Get the path from a QML url

FileDialog gives a QML url variable. theurl.toString() gives something like file:///c:\foo\bar.txt. How do I get c:\foo\bar.txt? I want to do it in a cross-platform way, and ideally without relying on regex-style hacks. QUrl provides a path()…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
25
votes
4 answers

Add multiple extensions in one filetypes mac - tkinter/filedialog/askopenfilename

I am trying to use tkinter.filedialog to choose the file in Mac. It works fine with one filetype in this way: filedialog.askopenfilename(filetypes=[("Excel files", "*.xlsx")]) However, I want to choose either xlsx or xls files. I searched and found…
Joe
  • 365
  • 1
  • 3
  • 8
25
votes
3 answers

PyQt4 File select widget

I want to make a QT4 (using QT designer) dialog, that contains a part where a file has to be selected. Now, I know QFileDialog exists, and I can program something that does what I want. But can I also just do it in QT designer? Is there some way to…
Nathan
  • 515
  • 2
  • 7
  • 14
20
votes
1 answer

Ask user where to save file with Node.js

I'm creating an app using node-webkit, so there's a lot of javascript. I have written a node.js function that will take a screen shot and save it to the disk, however, it saves it to the project root dir and I would like to prompt the user to…
Jake Sellers
  • 2,350
  • 2
  • 21
  • 40
12
votes
2 answers

Possible to specify the start position of an IFileDialog?

I can't find anything in the Microsoft documentation, so I'm just wondering if any one knows, is it possible to specify the starting position for an IFileDialog? Specifically, I'd like the first time the dialog is opened for it to open in the center…
erlloyd
  • 485
  • 6
  • 20
12
votes
4 answers

How to filter file type in FileDialog?

I am using FileDialog for saving and loading in a Java program. How can I filter the dropdown list to specify the file type as "JPG" or "JPEG" etc. ? I have tried the following code, but it seems to have no effect. Are there any other ways of doing…
PinkiePie-Z
  • 525
  • 1
  • 6
  • 28
11
votes
3 answers

Capturing the close of the browse for file window with JavaScript

I am using infile to ask the users to browse for a file on their machine. Is there way to catch if the window is closed without file being selected? For example if x is clicked.
setlio
  • 726
  • 2
  • 13
  • 32
10
votes
3 answers

How can I make a java FileDialog accept directories as its FileType in OS X?

I am trying to switch from using a JFileChooser to a FileDialog when my app is being run on a mac so that it will use the OS X file chooser. So far I have the following code: FileDialog fd = new FileDialog(this); …
Mike2012
  • 7,629
  • 15
  • 84
  • 135
9
votes
2 answers

FileDialog DoubleClick Behavior

While developing a WinForms application, I came across what I believe is a bug in the OpenFileDialog and SaveFileDialog controls. A Google search turned up a single other person who noticed the same issue, but neither a solution nor a workaround was…
Shaun Hamman
  • 2,287
  • 4
  • 21
  • 33
9
votes
3 answers

Set the initial directory in SWT FileDialog

I'm working on an Eclipse RCP project and need to let the user select some file. For convenience, based on some conditions, the initial directory of the file choosing dialog should be set prior to opening it. As I'm bound to Eclipse RCP / SWT, I am…
Bluddymarri
  • 313
  • 1
  • 3
  • 12
8
votes
4 answers

Save FileDialog in Java strips initial file extension

I'm using java.awt.FileDialog to create a dialog for saving a file. The problem is that when I specify a suggested (default) file name, FileDialog strips its extension. Example: import java.awt.*; import java.io.*; public class SaveFile { …
vocaro
  • 2,779
  • 2
  • 23
  • 16
1
2 3
23 24