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
4
votes
1 answer

How to get absolute path to files from FileDialog in SWT?

I am using SWT's FileDialog to let user select several files: FileDialog dlg = new FileDialog(s, SWT.MULTI); dlg.setFilterPath(somePath); String fn = dlg.open(); if (fn != null) String [] files = dlg.getFileNames() While fn returns the absolute…
lynxoid
  • 509
  • 6
  • 14
4
votes
2 answers

File dialog doesn't appear inside a jquery-ui-dialog

I have a jquery-ui-dialog that contains a
which contains a For some of my users when they click on the button to open the file dialog: it doesn't appear. The issue is not browser based since computer that have this issue are…
Julien Grenier
  • 3,364
  • 2
  • 30
  • 43
4
votes
1 answer

Only one file type to be accepted

from tkinter import filedialog as fd filename = fd.askopenfilename(title = "Select file",filetypes = (("CSV Files","*.csv"),("All","*.*"))) Opens the folder to choose the file, but when I try: from tkinter import filedialog as fd filename =…
Grass
  • 185
  • 2
  • 14
4
votes
2 answers

Why does asksaveasfilename not return the file type?

Tkinter is a great package and filedialog has some very helpful features. Both askopenfilename and asksaveasfilename have the 'filetypes' attribute, but it works differently for each one. With askopenfilename it provides options in the GUI and…
4
votes
2 answers

Extension not added to file name after saving

I get files with no extension after saving them, although I give them extensions by filetypes option in my program. I can only do it using defaultextension option, but I want to let user decide to choose an extension without messing with code. Plus,…
Parviz Karimli
  • 1,247
  • 1
  • 14
  • 26
4
votes
2 answers

Why does FileDialog sometimes not remember the initial directory?

I have made a WPF application on which you can open some Open/SaveFileDialogs. On my PC it remembers the directory I was in last time I used such a dialog and sets that as initial directory when I open another such dialog. But on my colleague's PC…
Matthijs Wessels
  • 6,530
  • 8
  • 60
  • 103
4
votes
2 answers

Get a file's directory in a string selected by askopenfilename

I'm making a program that you use the askopenname file dialog to select a file, which I then want to save the directory to a string so I can use another function (which I already made) to extract the file to a different location that is…
Phoenix
  • 365
  • 3
  • 5
  • 12
4
votes
2 answers

Why does the Java AWT FileDialog setIconImage method fail to set the icon?

I am attempting to use a Java AWT FileDialog, but I want to replace the default Java Dialog icon with something else. In short, the code looks something like this: Frame frame = new Frame(); Image image = ImageIO.read(new…
Adam
  • 1,011
  • 2
  • 19
  • 37
4
votes
0 answers

pyplot.show() reopens old tkinter dialog

EDIT: This seems to be a problem restricted to Tcl/Tk on Mac OS systems. So if you have no experience with that, this topic might be moot... I want to have a Python script that does two things: Ask the user for a file name via a Tkinter file…
4
votes
2 answers

Python Tkinter: Adding widgets to file dialogs

I am using Tkinter with Python 2.6 and 2.7 for programming graphic user interfaces. These User Interfaces contain dialogs for opening files and saving data from the tkFileDialog module. I would like to adapt the dialogs and add some further entry…
Michael Westwort
  • 914
  • 12
  • 24
3
votes
1 answer

JFileChooser vs JDialog vs FileDialog

I need to know which of the 3 is best for me. My requirements are as follows in order of importance: Save and load files with ease. File type filter during file selection (not afterwards). Look and feel is exactly the same as the native OS L&F. If…
Perry Monschau
  • 883
  • 8
  • 22
3
votes
2 answers

wxpython save file dialog gives a gtk-warning

the code here below: #!/usr/bin/env python import wx class MyForm(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, wx.ID_ANY, "File and Folder Dialogs Tutorial") panel = wx.Panel(self,…
robelix
  • 33
  • 4
3
votes
1 answer

How do I use showOpenDialog withe Electron’s IPC?

I am learning to live without remote in my electron app. I have got to the point where I need to open a file from the renderer, which I understand required the main process to show the file dialog and send back the results. In my main.js, I have the…
Manngo
  • 14,066
  • 10
  • 88
  • 110
3
votes
1 answer

Tkinter filedialog.askdirectory() can't find external drives

I have made some folder synchronization program in the last week that I wanted to primarily deploy to have an easy way to update security copies at an external harddrive or my phone, instead of having to delete all and copy all, which can take time…
RiiNagaja
  • 92
  • 9
3
votes
2 answers

Browsing file and getting filepath in entrybox in Tkinter

I am trying to make a simple GUI using Tkinter in python2, in which I need to make an entry box and a button besides that. The button browses the file and shows the filepath in the entrybox. How can I do that. I used the tkFileDialog.askopenfilename…
lsr729
  • 752
  • 2
  • 11
  • 25
1 2
3
23 24