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

Why the tkinter function automatically repeats twice?

When I try to build a simple UI, everything works well, except the tkinter function I used always repeats twice, I am not sure why this happens and how to deal with it. Here is an example code: import tkinter as tk root = tk.Tk() dirname =…
2
votes
1 answer

Input folder path and return a list of files on Tkinter

I'm using Tkinter for the code below. Goal Use filedialog to input the path of a folder to search and return the list of "mp3" files from the folder and put all the "mp3" in one OptionMenu. from tkinter import StringVar, filedialog import os import…
walo net
  • 31
  • 2
2
votes
1 answer

Catching "Cancel" in Tkinter

I have a script that opens a prompt window for a user to select a directory before performing some other tasks. If the user selects "Cancel", I want the program to display an appropriate message and exit the program. However, I cannot get this to…
Gurdish
  • 89
  • 1
  • 7
2
votes
1 answer

The (initialdir) in tkinter's filedialog isn't working with a variable

I'm doing a simple program that moves files, and I'm having it pull the file paths from a text document so it doesn't have to be inputed every time. Here's the function for one of the buttons: def XboxClick(): pathfinder = open("settings.txt",…
andrr
  • 23
  • 4
2
votes
0 answers

Extension name does not automatically change when changing file type in FileDialog

I'm trying to make a dialog that allows selecting a file name and file type. While the dialog is opening, if I change the file type, the file name does not update the extension automatically corresponding file type. Here is my example code: public…
James
  • 21
  • 1
2
votes
1 answer

Conflict between two tkinter GUI's Variable

I have one main GUI and secondary GUI, the secondary GUI can be called independently and also by pressing a button on the main GUI. Scenario1: When I directly open the secondary GUI everything works. Scenario2: When I call secondary GUI from Main…
Manish
  • 27
  • 3
2
votes
3 answers

Python file listing

I'm trying to find all the files in a folder starting with 'msCam' and ending with an extension '.avi'. I manage to do so with the following code: path = path_to_analyze files = [i for i in os.listdir(path) if os.path.isfile(os.path.join(path,i))…
2
votes
0 answers

Using tkinter filedialog.askdirectory to choose paths and preform a script using those paths

I have a project where I'm creating a simple GUI where the user chooses a source and destination directory using filedialog.askdirectory() that does two things. Displays the chosen path into an entry box for 'visible' verification. Initializes two…
Scott K.
  • 191
  • 1
  • 2
  • 12
2
votes
2 answers

QML FileDialog (selectFolder)

I am doing an App in QML / QT / C++ (to train myself for an internship). I need to open a FileDialog in order to choose a folder location but I get an error when writing the line selectFolder: true. I found this property here…
fallous
  • 31
  • 6
2
votes
1 answer

Java: How to force the localization for swt FileDialog

I would localize a FileDialog component in English. My default language is Italian. Is it possible? The project where I'm using the FileDialog is an Eclipse plug-in project. I've found the solution only for JFileChooser components and it…
Lorenzo B
  • 33,216
  • 24
  • 116
  • 190
2
votes
1 answer

Qt's FileDialog defaultSuffix not functionning

I'm using the following code to the new property of the filedialog under QtQuick.Dialogs 1.3 & Qt 5.10.0. I've build it using Qt Creator 5.10 default kit. import QtQuick 2.10 import QtQuick.Window 2.2 import QtQuick.Dialogs 1.3 Window { …
2
votes
1 answer

JavaFX FileDialog focus

I am now trying to make focus to FX FileDialog. When i click outside the dialog, dialog is outfocused. Its any way to make when i click outside, the dialog call any metod that make him visible (focused)? TY :) I just tried any like…
HxAxNxY
  • 43
  • 5
2
votes
1 answer

FileDialog filter - LINQ concatenation

While creating service to display OpenFileDialog/SaveFileDialog, I was thinking about creating LINQ query/clear C# code to Concatinate()/Join() filter expression. Do the filter based on this call: string res = ""; if(new…
Tatranskymedved
  • 4,194
  • 3
  • 21
  • 47
2
votes
5 answers

File download dialog IE7 disappears

The following code will not run correctly in IE7 with the latest service packs installed. System.Web.HttpResponse response = System.Web.HttpContext.Current.Response; response.Clear(); response.AddHeader("Content-Disposition",…
Dimi Takis
  • 4,924
  • 3
  • 29
  • 41
2
votes
4 answers

How do I add widgets to a file dialog in wxpython?

I'm creating a file dialog that allows the user to save a file after editing it in my app. I want to add a checkbox to the dialog so the user can make some choices about what format the file is saved in. I think I need to make some new class that…